dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 376 forks source link

Support for 'NOT IN' or Array in the orm.ne() method #529

Closed shoaibmerchant closed 10 years ago

shoaibmerchant commented 10 years ago

The direct find query for an array works well by translating to 'IN', how can I go about negating the output i.e. 'NOT IN'

user.find({id: idArr}, function(err, users){
}):

I checked the orm.ne() method but it gives result only for single value and not in case of an array, if it is modified to support arrays then it will solve the problem. Let me know if any other solution can solve the issue. Thanks!

Locke commented 10 years ago

It is possible since https://github.com/dresende/node-sql-query/pull/25

Maybe this isn't documented well, I can have a look at it tomorrow.

shoaibmerchant commented 10 years ago

Nice, i found the not_in() operator in the commit. Thanks!