Skip to content
Snippets Groups Projects
Commit 728afa52 authored by Morton Jonuschat's avatar Morton Jonuschat Committed by Benni Mack
Browse files

[BUGFIX] Extbase: Fix counting objects on joined tables

While it's normally fine to replace DISTINCT with GROUP BY when counting
objects this results in a different resultset. The GROUP BY statement will
have n rows with the count per grouped combination while the DISTINCT
based query will have one row with the count of unique combinations.

Use a COUNT(DISTINCT uid) to get the expected result. 
DISTINCT is supported on MySQL, PostgreSQL, Oracle and MSSQL Server.

Change-Id: If3193113529f1bb01693dba39abccfe349f169b1
Resolves: #79330
Releases: master
Reviewed-on: https://review.typo3.org/51320


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarManuel Selbach <manuel_selbach@yahoo.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent 69daabbf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment