Deprecation: #100335 - TCA config MM_insert_fields
See forge#100335
Description
The TCA option
MM_ has been marked
as deprecated and should not be used anymore.
Impact
Using
MM_ raises a deprecation level log message
during TCA cache warmup. Its functionality is kept in TYPO3 v12 but will
be removed in v13.
Affected installations
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.
Migration
General scope:
MM_ is used in combination with "true"
database MM intermediate tables to allow many-to-many relations between
two tables for
group,
select and sometimes even
inline
type fields.
A core example is the
sys_ to
tt_
relation, with
sys_ as intermediate table: The
intermediate table has field
uid_ (pointing to a uid of
the "left"
sys_ table), and
uid_ (pointing to a
uid of the "right"
tt_ table). Note this specific relation also
allows multiple different "right-side" table-field combinations, using the two
additional fields
tablenames and
fieldname. All this is configured
with TCA on the "left" and the "right" side table field, while table
sys_ has no TCA itself. Rows within the intermediate
table are transparently handled by TYPO3 by the
Relation and
extbase TCA-aware domain logic.
The
MM_ 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
definition.
Note on the related option
MM_: This is important when an
MM relation allows multiple "right" sides. In the example above, when a category
is added to a
tt_ record using the
categories field, and when editing
this relation from the "right" side (editing a
tt_ record), then this option
is used to select only relations for this
tt_ combination. The
TCA column
categories thus uses
MM_ to restrict the
query. Note
MM_ is not set for the "left-side"
sys_
items fields, this would indicate a TCA misconfiguration.
Various extensions in the wild did not get these details right, and often simply
set both
MM_ and
MM_ to the same values.
Removing
MM_ helps reducing confusion and simplifies this
construct a bit. Affected extensions can simply remove the
MM_
configuration and keep the
MM_. Note the Core strives to further
simplify these options and
MM_ may become fully obsolete in the
future as well.