Project

General

Profile

Actions

Bug #48701

open

setChildTableName regards only $columnConfiguration['foreign_table']

Added by Gernot Schulmeister almost 11 years ago. Updated 11 months 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 #1

Updated by Alexander Schnitzler almost 11 years ago

See related issue(s). Its known to us.

Actions #2

Updated by Anja Leichsenring almost 11 years ago

  • Target version set to Extbase 6.3
Actions #3

Updated by Alexander Opitz over 9 years ago

  • Project changed from 534 to TYPO3 Core
  • Category set to Extbase
  • Target version changed from Extbase 6.3 to 7.0
  • TYPO3 Version set to 7
  • Is Regression set to No
Actions #4

Updated by Mathias Schreiber over 9 years ago

  • Target version changed from 7.0 to 7.1 (Cleanup)
Actions #5

Updated by Benni Mack almost 9 years ago

  • Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Actions #6

Updated by Susanne Moog almost 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #7

Updated by Benni Mack over 8 years ago

  • Target version deleted (7.5)
Actions #8

Updated by Stefan Froemken 11 months ago

Hello,

yes, would be cool to have such a solution in extbase.
For now I have helped me with TYPO3 QueryBuilder and $query->statement():

https://github.com/jweiland-net/yellowpages2/blob/6.1.0/Classes/Domain/Repository/CategoryRepository.php

Stefan

Actions

Also available in: Atom PDF