Issue Bug Under Review Quiet

#111128Extbase does not write the relation table for an MM field mapped to a single object

Alexander Schnitzler 10/18/26, 06:18 updated 10/18/26, 07:03

Description

A TCA field with MM and maxitems => 1 (for example type=select, renderType=selectSingle, foreign_table, MM) mapped to a single domain object property is persisted differently by Extbase than by DataHandler.

DataHandler stores the relation in the MM table and writes the number of relations into the field. Extbase writes the uid of the related object into the field and never touches the MM table:

Action DataHandler Extbase
set tag 2 on an empty field MM row (1, 2), field = 1 field = 2, no MM row
set the property to null MM row removed, field = 0 field = 0, MM row stays
replace tag 1 by tag 2 MM row (1, 2) replaces (1, 1), field = 1 field = 2, MM row (1, 1) stays, no row for tag 2

Reading through the MM table (backend, record API, Extbase itself after reload) therefore returns the old relation or none at all.

Reproduce: persist a model with such a property through update() and persistAll() and compare the field and the MM table with the result of the same change through DataHandler.

Reviews 1

History 02