You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the $unwind stage is built only when the following condition is true.
if (_.includes(['hasOne', 'belongsTo'], relation.type))
this seemed a bit odd. I tried 2 things:
inverting the condition so that $unwind is built only for hasMany relations.
removing the if block altogether.
In both cases all the tests passed, and the results of my requests stayed the same: hasMany relational field filters work only if the relation is 1 level deep and the field by which I'm filtering is not a foreign key.
I'm still investigating and I would appreciate any suggestion !
By the way, what does this comment mean /* istanbul ignore else */ ? :)
Thanks in advance and sorry for jumping in with multiple issues.
The text was updated successfully, but these errors were encountered:
Hi David, thank you for using this module and taking your time reporting issues.
I would like to be able to review it calmly and fix them. Meanwhile feel free to send PR if you find a solution. Thank you!
By the way, /* istanbul ignore else */ means that the else block for that "if" should be ignored for the coverage percetange. Actually there is no "else" but Istambull was detecting it as a coverage lack.
there's a test implying that
but after logging the resulting pipeline, I saw that it had no $unwind stage.
The only place in the code where the $unwind stage is built is in the buildLookup function in an if block:
the $unwind stage is built only when the following condition is true.
this seemed a bit odd. I tried 2 things:
In both cases all the tests passed, and the results of my requests stayed the same: hasMany relational field filters work only if the relation is 1 level deep and the field by which I'm filtering is not a foreign key.
I'm still investigating and I would appreciate any suggestion !
By the way, what does this comment mean /* istanbul ignore else */ ? :)
Thanks in advance and sorry for jumping in with multiple issues.
The text was updated successfully, but these errors were encountered: