cyjake / leoric

👑 JavaScript ORM for MySQL, PostgreSQL, and SQLite.

Home Page:https://leoric.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] $and AND $or with one value should work

JimmyDaddy opened this issue · comments

Model.find({
  where: {
     type: { $and: [ 'GOOD' ] }
  }
});

this will throw Cannot read property 'type' of undefined at src/drivers/abstract/spellbook.js:184:20

What is the expected behavior? ignore the $and or $or operator?

What is the expected behavior? ignore the $and or $or operator?

I think so, or is there another proper way?

or throw an error telling the user that the operator didn't receive enough arguments.

personally I'd go with ignore.