Type: string (table name) Scope: Proc. Types: group, select, inline
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
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
if necessary, depending on “local” side of the TCA definition.
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, KEY uid_local (uid_local), KEY uid_foreign (uid_foreign) );
Columns of the intermediate MM table¶
The intermediate table has three columns as a minimum:
- uid_local, uid_foreign (Required)
- Storing uids of both sides. If done right, this is reflected in the table name -
- sorting (Required)
- Is a required field used for ordering the items.
- Is required if the relation is bidirectional (see description and example below table)
- 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.