Deprecation: #100335 - TCA config MM_insert_fields¶
The TCA option
MM_insert_fields has been marked
as deprecated and should not be used anymore.
MM_insert_fields raises a deprecation level log message
during TCA cache warmup. Its functionality is kept in TYPO3 v12 but will
be removed in v13.
There may be extensions that use this option when configuring database MM relations. In most cases, the option can be removed. The migration section gives more details.
MM_insert_fields is used in combination with "true"
database MM intermediate tables to allow many-to-many relations between
two tables for
select and sometimes even
A core example is the
sys_category_record_mm as intermediate table: The
intermediate table has field
uid_local (pointing to a uid of
sys_category table), and
uid_foreign (pointing to a
uid of the "right"
tt_content table). Note this specific relation also
allows multiple different "right-side" table-field combinations, using the two
fieldname. All this is configured
with TCA on the "left" and the "right" side table field, while table
sys_category_record_mm has no TCA itself. Rows within the intermediate
table are transparently handled by TYPO3 by the
extbase TCA-aware domain logic.
MM_insert_fields now allows to configure a hard coded value for
an additional column within the intermediate table. This is obsolete: There is
no API to retrieve this value again, having a "stable" value in an additional
column is useless. This config option should be removed from TCA
Note on the related option
MM_match_fields: This is important when an
MM relation allows multiple "right" sides. In the example above, when a category
is added to a
tt_content record using the
categories field, and when editing
this relation from the "right" side (editing a
tt_content record), then this option
is used to select only relations for this
tt_content.categories combination. The
categories thus uses
MM_match_fields to restrict the
MM_match_fields is not set for the "left-side"
items fields, this would indicate a TCA misconfiguration.
Various extensions in the wild did not get these details right, and often simply
MM_match_fields to the same values.
MM_insert_fields helps reducing confusion and simplifies this
construct a bit. Affected extensions can simply remove the
configuration and keep the
MM_match_fields. Note the Core strives to further
simplify these options and
MM_match_fields may become fully obsolete in the
future as well.