[DDC-1260] Enable nesting of OR and AND statements in DQL queries Created: 08/Jul/11 Updated: 08/Aug/11 Resolved: 08/Aug/11
|Project:||Doctrine 2 - ORM|
|Reporter:||Andreas Förthner||Assignee:||Guilherme Blanco|
Currently it is not allowed to nest AND and OR conditions in themselves. However, this comes in handy if you try to do a dynamic query rewriting, where you want to add some more conditions without knowing the original query before.
The fix is trivial, just allow to add AND in AND. The same needs to be done for OR. Patch will follow in a second...
|Comment by Guilherme Blanco [ 08/Jul/11 ]|
This can lead to unpredictable situations inside QueryBuilder.
I need to actually test it on every driver to make sure if it doesn't break anything. It was not originally designed to hold same instances. If you pay attention:
Is the same as:
Can't you make a check internally and use addMultiple?
|Comment by Guilherme Blanco [ 08/Aug/11 ]|
In this commit: https://github.com/doctrine/doctrine2/commit/816ce41f638d28934c79a12ef27f954124b2639e