Issue Bug Closed

#48701setChildTableName regards only $columnConfiguration['foreign_table']

Gernot Schulmeister 05/31/13, 13:08 updated 12/02/25, 14:36

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?

Reviews 2

History 1117

  1. Alexander Schnitzler commented <span data-processor="relativetime" data-value="2013-05-31T15:07:28+00:00" > 05/31/13, 15:07 </span>

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

  2. Alexander Opitz changed project id category target version TYPO3 Version 7 Is Regression 0 <span data-processor="relativetime" data-value="2014-12-08T12:29:20+00:00" > 12/08/14, 12:29 </span>

  3. Stefan Froemken commented <span data-processor="relativetime" data-value="2023-06-16T18:22:51+00:00" > 06/16/23, 18:22 </span>

    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

  4. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-04-07T19:55:08+00:00" > 04/07/25, 19:55 </span>

    Applied in changeset commit:3f1a68654cbea25438a543b66a1722563fe6a2df.

  5. Gerrit Code Review pushed patch set 1 for 13.4 to change 88967 status Resolved Under Review <span data-processor="relativetime" data-value="2025-04-07T19:56:05+00:00" > 04/07/25, 19:56 </span>

  6. Benni Mack commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2025-04-08T08:30:11+00:00" > 04/08/25, 08:30 </span>

    Applied in changeset commit:965c9c4a33f9b0257fae96a9bae0b1a6c5aef51d.