1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/lib/Doctrine
flip111 76fda9562c Update SqlWalker.php fixed wrong GROUP BY clause on SQL Server platform
Without this patch a query would like like:
```
SELECT c0_.Country AS sclr0
FROM Continent c0_ WITH (NOLOCK)
WHERE c0_.Country = 38
GROUP BY sclr0
```
Using the column alias in the GROUP BY clause. However this is not allowed on SQL Server. References:
1. http://stackoverflow.com/a/3841804
2. http://technet.microsoft.com/en-us/library/ms189499.aspx (Logical Processing Order of the SELECT statement)

The correct query should be:
```
SELECT c0_.Country AS sclr0
FROM Continent c0_ WITH (NOLOCK)
WHERE c0_.Country = 38
GROUP BY c0_.Country
```
2013-09-26 14:11:56 +02:00
..
ORM Update SqlWalker.php fixed wrong GROUP BY clause on SQL Server platform 2013-09-26 14:11:56 +02:00