[DDC-2204] Order by With Equals is not supported Created: 17/Dec/12 Updated: 20/Apr/15 Resolved: 22/Dec/12
|Project:||Doctrine 2 - ORM|
|Reporter:||Ilya Biryukov||Assignee:||Benjamin Eberlei|
SQL construct tested on postgres 9.0, mysql 5.5, and sqlite 3.
The sample query (I want to bring a specific item to the top of the list).
In theory, the code below should generate the same query.
In practice, an exception is thrown.
Attached, SQL dump for the table & data
|Comment by Benjamin Eberlei [ 22/Dec/12 ]|
Its supported by including the condition in the SELECT clause, aliasing it, then using it. You might need to use "AS HIDDEN name" to prevent it from appearing in the result
|Comment by Alexey Kosov [ 20/Apr/15 ]|
It does not actually work.