Project

General

Profile

Actions

Bug #48701

open

setChildTableName regards only $columnConfiguration['foreign_table']

Added by Gernot Schulmeister over 11 years ago. Updated over 1 year ago.

Status:
New
Priority:
Could have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2013-05-31
Due date:
% Done:

0%

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

Description

in Tx_Extbase_Persistence_Mapper_DataMapFactory

functions
setOneToOneRelation
setOneToManyRelation
setManyToManyRelation

$columnMap->setChildTableName($columnConfiguration['foreign_table']);

but the TCA type 'group', internal_type 'db', does not necessarily provide a 'foreign_table' attribute, 'allowed' is sufficient for the table relation. But this causes an SQL Error if you make statements like

constraints[] = $query->like('property.relatedProperty', '%' . $searchVar . '%');

because the table of the property for the join is not provided in the SQL Statement

Error occurs in Version 4.7 and 6.1. Maybe fixed in the meantime. But the lines of code in the DataMapFactory are still the same.

The workaround is to set the foreign_table attribute in the TCA also for the 'group' type. But maybe a better solution directly in extbase would be nice?

Since this is my first report, please tell me if there is something I should do better?


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #47362: Category Model must support items propertyNew2013-04-18

Actions
Actions

Also available in: Atom PDF