[BUGFIX] Do not GROUP BY alias in WorkspaceService 81/54281/2
authorSusanne Moog <susanne.moog@typo3.com>
Wed, 4 Oct 2017 07:39:28 +0000 (09:39 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 6 Oct 2017 10:37:53 +0000 (12:37 +0200)
GROUP BY statements are in general evaluated before
SELECT statements. If a DBMS does not implement additional
logic to resolve aliases defined in SELECTS before grouping
the statement will fail. Currently both MSSQL as well as ORACLE
lack these additional implementations. To be safe we should
group by the non-aliased columns.

Change-Id: I04698b2c31fbe2b0907fd345fbbf5e84dcebf164
Resolves: #82664
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/54281
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>

index 6ca08ac..abf888b 100644 (file)
@@ -1071,7 +1071,7 @@ class WorkspaceService implements SingletonInterface
-                ->groupBy('pageId')
+                ->groupBy('B.pid')
             $pageIds = [];