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

Also available in: Atom PDF