不要怂,就是干,撸起袖子干!

Commit 794176e7 by Ruslan Kovtun

Give more meaning for operator 'or'

`Projects`.`id` IN (1,2,3) OR `Projects`.`id` < 10
has no sense, second part should be enough.

That's why I replaced `lt` lookup with `gt` to generate following SQL
`Projects`.`id` IN (1,2,3) OR `Projects`.`id` > 10
which have much more sense.
1 parent 6401eba4
Showing with 2 additions and 2 deletions
...@@ -727,7 +727,7 @@ Project.find({ ...@@ -727,7 +727,7 @@ Project.find({
{ name: 'a project' }, { name: 'a project' },
Sequelize.or( Sequelize.or(
{ id: [1,2,3] }, { id: [1,2,3] },
{ id: { lt: 10 } } { id: { gt: 10 } }
) )
) )
}) })
...@@ -740,7 +740,7 @@ SELECT * ...@@ -740,7 +740,7 @@ SELECT *
FROM `Projects` FROM `Projects`
WHERE ( WHERE (
`Projects`.`name`='a project' `Projects`.`name`='a project'
AND (`Projects`.`id` IN (1,2,3) OR `Projects`.`id` < 10) AND (`Projects`.`id` IN (1,2,3) OR `Projects`.`id` > 10)
) )
LIMIT 1 LIMIT 1
; ;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!