Skip to content
Snippets Groups Projects
Commit 605b3e51 authored by Stefan Froemken's avatar Stefan Froemken Committed by Benni Mack
Browse files

[BUGFIX] Fix count for custom queries with group by statement

When using the extbase persistence and setting a custom query
with group by statements via $query->statement($statement),
calling $query->execute()->count() did not return the right
amount of records. Instead the database backend chose the
first column of one of the returned records which resulted
in the count of a subset of grouped records.

To fix this, the database backend needs to build a count
query with a distinct statement on all fields that are
used for the grouping.

Resolves: #87655
Releases: master, 10.4
Change-Id: Ia7ad4535a39f5b285efd9249807b5ddd4725b90c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59641


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarRémy DANIEL <dogawaf@no-log.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarRémy DANIEL <dogawaf@no-log.org>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 6889e440
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