string (table name)
The relation of the records of the specified table gets stored in an intermediate table. The name of this table is stored in the property
This property is used with foreign_table (select) for
selectfields, allowed (group) for
groupfields or foreign_table (inline) for
The table defined in this property is automatically created by the Database Analyzer starting with v11.4.
The field for which an MM configuration exists stores the number of records in the relation on each update, so the field should be an integer.
Using MM relations you can only store the relations for foreign tables in the list. You cannot add properties like string values for the relation itself.
MM relations and FlexForms¶
MM relations has been tested to work with FlexForms if not in a repeated element in a section.
Auto creation of intermediate MM tables from TCA¶
New in version 11.4: Starting with v11.4 intermediate mm tables defined in
are created automatically and do not have to be defined in
TCA table column fields that define
drop specification of the intermediate mm table layout in:
ext_tables.sql. The TYPO3 database analyzer
takes care of proper schema definition.
Extensions are strongly encouraged to drop
CREATE TABLE definitions for those intermediate tables referenced by
TCA table columns. Dropping these definitions allows the Core to adapt
and migrate definitions if needed.
The mm tables are automatically created if:
A table column TCA config defines
The "MM" intermediate table has no TCA table definition (!).
A table of the resulting name is not defined in
The schema analyzer takes care of further possible fields apart from
uid if necessary, depending on local side of the
The fields used for sorting
always created, they do not need to be defined in TCA.
The "local" side of a mm table is defined as such in TCA:
... 'columns' => [ ... 'myField' => [ 'label' => 'myField', 'config' => [ 'type' => 'group', 'foreign_table' => 'tx_myextension_myfield_child', 'MM' => 'tx_myextension_myfield_mm', ] ], ... ], ...
A table like the following will be automatically created in the Database Analyzer:
CREATE TABLE tx_myextension_myfield_mm ( uid_local int(11) DEFAULT '0' NOT NULL, uid_foreign int(11) DEFAULT '0' NOT NULL, sorting int(11) DEFAULT '0' NOT NULL, sorting_foreign int(11) DEFAULT '0' NOT NULL, KEY uid_local (uid_local), KEY uid_foreign (uid_foreign) );
Columns of the intermediate MM table¶
The intermediate table may have the following fields:
- uid_local, uid_foreign
Storing uids of both sides. If done right, this is reflected in the table name -
- sorting, sorting_foreign
Are required fields used for ordering the items.
Is used if multiple tables are allowed in the relation.
- uid (auto-incremented and PRIMARY KEY)
May be used if you need the "multiple" feature (which allows the same record to be references multiple times in the box. See MM_hasUidField for type='select' and MM_hasUidField for type='group' fields.
- further fields
May exist, in particular if MM_match_fields / MM_match_fields is involved in the set up.