Issue Bug Closed

#62277TCA > Config > type group - foreign_table necessary for extbase to work

Mats Nygaard 10/16/14, 12:26 updated 12/02/25, 14:36

Description

Having the following TCA for an object:

'config' => array(
    'type' => 'group',
    'internal_type' => 'db',
    'allowed' => 'pages',
    'MM' => 'tx_tcteaser_mm',
    'MM_insert_fields' => array('tablename' => 'tx_tcteaser_domain_model_teaser'),
    'MM_match_fields' => array('tablename' => 'tx_tcteaser_domain_model_teaser'),
    'size' => 10,
    'minitems' => 0,
    'maxitems' => 9999,
),

it works fine in the backend. However, in the frontend, using extbase, all repository calls, ie. findAll(), generates an error, where lastBuiltQuery is this:

SELECT .* FROM tx_tcteaser_mm LEFT JOIN ON tx_tcteaser_mm.uid_foreign = .uid WHERE (tx_tcteaser_mm.uid_local = 1 AND tx_tcteaser_mm.tablename = ‘tx_tcteaser_domain_model_teaser’) ORDER BY tx_tcteaser_mm.sorting ASC

As you can see, the foreign table is not known.

By adding foreign_table (in this case ‘pages’) to the config, the error disappears, and everything is fine.

But – foreign_table is not mentioned in the documentation for “group” at all.

Should foreign_table be added OR is this an axtbase bug?

Reviews 2