Bug #48701
opensetChildTableName regards only $columnConfiguration['foreign_table']
0%
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?
Updated by Alexander Schnitzler over 11 years ago
See related issue(s). Its known to us.
Updated by Anja Leichsenring over 11 years ago
- Target version set to Extbase 6.3
Updated by Alexander Opitz almost 10 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
Updated by Mathias Schreiber almost 10 years ago
- Target version changed from 7.0 to 7.1 (Cleanup)
Updated by Benni Mack over 9 years ago
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Stefan Froemken over 1 year 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():
Stefan