Skip to content
Snippets Groups Projects
Commit 843a5d58 authored by Thomas Maroschik's avatar Thomas Maroschik Committed by Christian Kuhn
Browse files

[BUGFIX] Typo3DBQueryParser fails to wrap subselect in braces

When the Typo3DBQueryParser converts Extbase queries to Doctrine
queries, it creates subselects for certain relation constraints.
It fails to wrap the subselect in braces for has-many relations
which leads to sql exceptions.

This patch introduces braces around those subselects.

Change-Id: Ie9721a01bf166391770c7a1471272af0e15f9ccb
Fixes: #81240
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/52847


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent a819b117
No related branches found
No related tags found
No related merge requests found
......@@ -359,7 +359,7 @@ class Typo3DbQueryParser
// Add it to the main query
return $this->queryBuilder->expr()->eq(
$tableName . '.uid',
$queryBuilderForSubselect->getSQL()
'(' . $queryBuilderForSubselect->getSQL() . ')'
);
} else {
return $this->queryBuilder->expr()->inSet(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment