Review 10.4 Merged

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

Benni Mack CR +2 V +2 Normal +146 −4 updated 11/04/20, 17:08

Commit message

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.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • TYPO3com +1 CI

Issues 1

Files 4

Review log 46

  1. Benni Mack commented on patch set 1 11/03/20, 19:04

    Cherry Picked from branch master.
  2. TYPO3com voted on patch set 1 V -1 11/03/20, 19:16 Completed build in 12m 25s on Tue, 3 Nov, 07:16 PM Test Summary: 74098 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-711

  3. TYPO3com voted on patch set 1 V +1 11/03/20, 20:09 Completed build in 1h 17m 20s on Tue, 3 Nov, 08:09 PM Test Summary: 74975 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-711

  4. Benni Mack voted on patch set 1 V +2 CR +2 11/03/20, 20:09

  5. Benni Mack merged patch set 2 11/03/20, 20:09

  6. Anja Leichsenring wrote 11/04/20, 17:08

    Created a revert of this change as I8affaf98b67066e6794d96a7beb3585a1edfd54f