2

I am working on the Node ORM.

I want to find the records based on logical OR condition.

Parag Kuhikar
  • 485
  • 2
  • 6
  • 17

1 Answers1

2

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
});
Parag Kuhikar
  • 485
  • 2
  • 6
  • 17