Reputation: 91
How to execute "not in array" query in Sails' waterline ORM that would be equal to mongooses' $nin?
Question.find({id: {"!=": [2] } }).exec(function(err, docs){})
this example seems not working.
Upvotes: 3
Views: 1802
Reputation: 2416
You can do the following query in Sails-Mongo
Model.find({ id: { '!': [2,3,4,...] } }
Upvotes: 2
Reputation: 9025
Seems like $nin
, which should have been implemented on the adapter level, simply hasn't been added to sails-mongo
yet. At least, there's no sign of it in the current source code.
Upvotes: 0