mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3434: LimitSubqueryOutputWalker does not retain correct ORDER BY expression fields when dealing with HIDDEN sort fields #4234
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 (Dec 5, 2014).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @ocramius:
As per discussion in DDC-3336, the
Doctrine\ORM\Tools\Pagination\LimitSubqueryOutputWalkerdoes not retain the correct fields in theORDER BYcondition when one of the selected fields is marked asHIDDEN.As an example, take a DQL query like:
SELECT a, a.name AS HIDDEN ord FROM Doctrine\Tests\ORM\Tools\Pagination\Author a ORDER BY ord DESCThis will result in an SQL query like:
SELECT DISTINCT id*0 FROM (SELECT a0_.id AS id_0, a0_.name AS name_1, a0_.name AS name_2 FROM Author a0_ ORDER BY name_2 DESC) dctrn*resultRemoving the
HIDDENmodifier will cause the query to produce the correct SQL:SELECT DISTINCT id*0, name_2 FROM (SELECT a0_.id AS id_0, a0_.name AS name_1, a0_.name AS name_2 FROM Author a0_ ORDER BY name_2 DESC) dctrn_result ORDER BY name*2 DESC@doctrinebot commented on GitHub (Dec 5, 2014):
HIDDENfields inORDER BYquery@doctrinebot commented on GitHub (Dec 5, 2014):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1210] was closed:
https://github.com/doctrine/doctrine2/pull/1210
@doctrinebot commented on GitHub (Dec 5, 2014):
Issue was closed with resolution "Fixed"