Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
MM
New in version 11.4
TCA table column fields that define ['config']
can omit the
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
from the ext_
file for those intermediate tables
referenced by TCA table columns. Dropping these definitions allows the Core
to adapt and migrate definitions if needed.
MM
-
- Type
- string (table name)
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Proc.
This value contains the name of the table in which to store a MM relation. It is used together with allowed (group). If you use Extbase, foreign_table has to contain the same table name additionally.
The database field with a MM property only stores the number of records in the relation.
Please have a look into the additional information in the MM common property description.
The table name used in the field
MM
should be unique. It must be a valid SQL table name. It is best practise to use the name of both referenced tables and of the field in which the reference is saved on local side. See also naming conventions for mm tables. This way uniqueness can be ensured and it is possible to find the field where the table is used quickly.Example:
// table tx_myextension_domain_model_mymodel1 $fields = [ 'relation_table1_table2' => [ 'label' => 'Some relation from table 1 to table 2', 'config' => [ 'type' => 'group', 'allowed' => 'tx_myextension_domain_model_mymodel2', 'foreign_table' => 'tx_myextension_domain_model_mymodel2', // needed by Extbase 'MM' => 'tx_myextension_domain_model_mymodel1_mymodel2_mm', ], ], ];
Copied!