mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[MSSQL] Invalid query generation when using GroupBy with a ResultVariable #6165
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 @KevVerF on GitHub (Feb 1, 2019).
Quite some years ago, support was added to use GroupBy based on a ResultVariable =>
2642daa438.However, this doesn't always works on MSSQL as MS has its own syntax ;(. For example following query will fail on MSSQL.
As this generates:
Therefore, I have a request to make this (optionally) platform specific. I went through the code a bit to locate the part of interest and my best guess would be to modify Doctrine\ORM\Query\SqlWalker::walkGroupByItem().
Unfortunately I'm not familiar with the doctrine code else I would have made a pull request rather than copy/pasting some code here. So I might have missed some practices, issues, etc...
Thanks in advance!