Closed bonanzakrak closed 8 years ago
@bonanzakrak hi, does this work correctly using waterline? did you tryied using another adapter? could you add a console.log at top of adapter join function to see input?
as you can see here https://github.com/balderdashy/sails-mongo/blob/master/lib/adapter.js#L447 it looks like sails-mongo does not support select with populate...
we'd love writting an offshore-mongo adapter but we don't have time for this now...
Thats true. sails-mongo
is the issue here. Those lines:
if (typeof criteria === 'object') {
delete criteria.select;
}
I think i know what author had in his mind. Not allow user to join over fields that are not selected. But it is done in a wrong way :/
I need to write it other way now. Thanks for your help.
First of all I'm using MongoDB driver. For example we have 2 Models. User which is not important in this case, and Test:
and now we want to query that:
And this works perfectly fine. Unless we want to add
select
param to outfind
method.This will return all
F1
,F2
andF3
. We can removepopulate
.Without populate it works fine. It returns only
F1
as expected.