mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-2113: SQLFilter incorrect results when WHERE clause contains OR expression #2662
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Nov 1, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user vclayton:
When using an SQLFilter, if applied to a query that contains only OR expressions in the WHERE clause, the generated SQL is incorrect.
Example:
Resulting SQL:
"SELECT u FROM User u WHERE u.fname='bob' OR u.lname='bob' AND u.accountid=2"
Expected:
"SELECT u FROM User u WHERE (u.fname='bob' OR u.lname='bob') AND u.accountid=2"
The problem is that the order of operations is wrong. I'm getting users who aren't in account 2, making SQLFilter unreliable.
@doctrinebot commented on GitHub (Nov 5, 2012):
Comment created by @FabioBatSilva:
Fixed :
129d6efd85@doctrinebot commented on GitHub (Nov 5, 2012):
Issue was closed with resolution "Fixed"