Reputation: 485
I am working on the Node ORM.
I want to find the records based on logical OR condition.
Upvotes: 2
Views: 812
Reputation: 485
You have to pass following array in the find method of the Person model.
Person.find({or:[{col1: 1}, {col2: 2}]}, function(err, res) { // res is Person where col1 == 1 or col2 == 2 });
Upvotes: 2