Project

General

Profile

Actions

Feature #55959

closed

Joins on SubClasses

Added by Philipp Wrann almost 11 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2014-02-13
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

Description

The Typo3DbBackend Class does not respect the possibility you join a table with the same table. This happens if you use SubClasses which are connected.

An alias should be taken there. I managed to make this work, but its just a very quick and dirty solution. I replaced the backend by a patched, its attached to this issue. Just ignore the other modifications.

The approach is the usage of alias and a additional param in the function for the parent.

The problem occured when i made a query like this

->contains(location.rootline,uid)

where the aggregate i want to filter is a SubClass of the same class my location is a subClass of. So the join looked like

select * from tx_ex_domain_model_object left join tx_ex_domain_model_object on ....

Because SuperClass and SubClasses are a feature of extbase this is a must-have.


Files

PatchedTypo3DbBackend.php (14.6 KB) PatchedTypo3DbBackend.php Philipp Wrann, 2014-02-13 14:36

Related issues 2 (0 open2 closed)

Has duplicate TYPO3 Core - Bug #57629: Wrong SQL-Query with tow joins on same tableClosed2014-04-03

Actions
Is duplicate of TYPO3 Core - Bug #27057: Can't query on properties of child objects of the same classClosedAlexander Schnitzler2011-05-26

Actions
Actions

Also available in: Atom PDF