mirror of
https://github.com/doctrine/orm.git
synced 2026-04-30 01:43:20 +02:00
Pagination not working when SimpleArithmetic is used in order by #6285
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 @Seb33300 on GitHub (Aug 19, 2019).
Originally assigned to: @lcobucci on GitHub.
Bug Report
Summary
When using
Paginatoron a query using aSimpleArithmeticexpression in theORDER BY, I am encountering a MySQL error:Result in:
This is because the
Paginatorhandles onlyPathExpressionto prevent this.Here is the PR to fix this: https://github.com/doctrine/orm/pull/7803
@lcobucci commented on GitHub (Oct 1, 2019):
As explained in https://github.com/doctrine/orm/pull/7803#pullrequestreview-295948417 we should rather use
HIDDENfields to be able to have arithmetic operations inORDER BY. So the query should rather be:Closing as invalid here as well.