Project

General

Profile

Actions

Bug #79322

closed

Invalid SQL Statement created in Extbase getObjectCountByQuery()

Added by Morton Jonuschat almost 8 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Category:
Extbase
Target version:
Start date:
2017-01-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Opening the TER extension list with PostgreSQL Database (probably also in MySQL with ONLY_FULL_GROUP_BY enabled) triggers and SQL error due to counting all fields using COUNT and trying to sort the result.:

SQL Statement created:

SELECT COUNT(*) FROM "tx_extensionmanager_domain_model_extension" "tx_extensionmanager_domain_model_extension" WHERE ("tx_extensionmanager_domain_model_extension"."current_version" = :dcValue1) AND ("tx_extensionmanager_domain_model_extension"."review_state" >= :dcValue2) ORDER BY "tx_extensionmanager_domain_model_extension"."last_updated" DESC

Error:

SQLSTATE[42803]: Grouping error: 7 ERROR:  column "tx_extensionmanager_domain_model_extension.last_updated" must appear in the GROUP BY clause or be used in an aggregate function


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #93576: Typo3DbBackend::getObjectCountByQuery does not work correctly with custom doctrine queriesNew2021-02-24

Actions
Actions #1

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51313

Actions #2

Updated by Morton Jonuschat almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #3

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions #4

Updated by Michael Grundkötter over 3 years ago

  • Related to Bug #93576: Typo3DbBackend::getObjectCountByQuery does not work correctly with custom doctrine queries added
Actions

Also available in: Atom PDF