Bug #81240

Typo3DBQueryParser doesn't wrap subselect in braces for has many relations

Added by Thomas Maroschik about 2 years ago. Updated 9 months ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2017-05-17
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When your Extbase Model contains a RELATION_HAS_MANY and your query contains a constraint relating to this relation, the Typo3DbQueryParser generates a subselect for this property. This subselect has to be wrapped in braces, so the MySQL query parser can distinguish between the main and the subquery. These are missing currently.

Associated revisions

Revision bd5511e6 (diff)
Added by Thomas Maroschik about 2 years ago

[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/52817
Reviewed-by: Henrik Elsner <>
Tested-by: TYPO3com <>
Reviewed-by: Jan Helke <>
Tested-by: Jan Helke <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 843a5d58 (diff)
Added by Thomas Maroschik about 2 years ago

[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: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review about 2 years ago

  • Status changed from In Progress 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/52817

#2 Updated by Gerrit Code Review about 2 years ago

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

#3 Updated by Thomas Maroschik about 2 years ago

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

#4 Updated by Benni Mack 9 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF