mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
CountWalker, Hidden field in select and in groupBy #6463
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 @viszman on GitHub (May 12, 2020).
Bug Report
Summary
I have Class that creates DQL and after successful fetching data from MySQL server it requests totalCount using vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php:263
Current behavior
SELECT o, x, y, SUBSTRING(o.longstring, 1, 10) as HIDDEN groupBY
FROM App\Entity\o o
INNER JOIN o.X x
LEFT JOIN o.Y y
GROUP BY groupBY
ORDER BY o.id ASC
CountWalker is replacing everything in SELECT with COUNT
How to reproduce
Expected behavior
not replacing HIDDEN fields if field in select is dependand on other fields like in above example