#99035Automatic mm-table generation fails on multiple allowed tables
Description
This TCA configuration generates the following sql table, where the necessary field “tablenames” is missing:
'fieldname' => [
'label' => 'Label',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'tt_address,fe_users,fe_groups',
'MM' => 'tx_my_group_mm',
'size' => '20',
],
],
CREATE TABLE `tx_my_group_mm` (
`uid_local` int(10) unsigned NOT NULL DEFAULT 0,
`uid_foreign` int(10) unsigned NOT NULL DEFAULT 0,
`sorting` int(10) unsigned NOT NULL DEFAULT 0,
`sorting_foreign` int(10) unsigned NOT NULL DEFAULT 0,
KEY `uid_local` (`uid_local`),
KEY `uid_foreign` (`uid_foreign`)
);
Since TYPO3 11.4 the MM table should be generated as needed automatically, which obviously is not working in this case:
https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/CommonProperties/Mm.html#auto-creation-of-intermediate-mm-tables-from-tca
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 1
-
Georg Ringer commented and changed status
NewClosed 03/24/25, 21:33
tested that in main and generated sql is
CREATE TABLE `tx_my_group_mm` ( `uid_local` INT UNSIGNED DEFAULT 0 NOT NULL, `uid_foreign` INT UNSIGNED DEFAULT 0 NOT NULL, `sorting` INT UNSIGNED DEFAULT 0 NOT NULL, `sorting_foreign` INT UNSIGNED DEFAULT 0 NOT NULL, `tablenames` VARCHAR(64) DEFAULT '' NOT NULL, `fieldname` VARCHAR(64) DEFAULT '' NOT NULL, INDEX `uid_local` (uid_local), INDEX `uid_foreign` (uid_foreign), PRIMARY KEY(uid_local, uid_foreign, tablenames, fieldname) ) engine = innodb row_format = dynamicso that looks ok now, therefore closing issue