Review main Merged

86957[BUGFIX] Respect model type configuration in ColumnMapFactory

Oli Bartsch CR +2 V +2 Hard +249 −23 updated 11/12/24, 07:09

Commit message

With #104808, the `ColumnMapFactory` was refactored
to rely on the `TcaSchema` and the associated
`RelationshipType` for building the ColumnMap.
Especially setting a `Relation`. While it's
generally correct to rely on TCA, the type
definition in a model had previously influence
on the resolving in the `ColumnMapFactory `.

An example is TCA type `passthrough`, which
is no `RelationalFieldTypeInterface`, as it
does not define any relation. However it's
possible and common in user land to assign
such property a dedicated type or a
`ObjectStroage` in the model, which
makes the field an actual relation.

For those use cases the extbase model
should continue to overrule the TCA
definition. Firstly for backwards
compatibility and secondly to reduce
the need for extbase extension developers
to fiddle around with TCA settings.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 1014

  1. Oli Bartsch uploaded patch set 1 11/11/24, 19:26

  2. core-ci voted on patch set 1 V +1 11/11/24, 19:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69318

  3. Oli Bartsch uploaded patch set 2 V +1 11/11/24, 19:52

  4. core-ci voted on patch set 2 V +1 11/11/24, 19:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69321

  5. Oli Bartsch uploaded patch set 3 V +1 11/11/24, 20:32

  6. Oli Bartsch uploaded patch set 4 11/11/24, 20:38

  7. core-ci voted on patch set 3 V +1 11/11/24, 20:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69322

  8. core-ci voted on patch set 4 V +1 11/11/24, 20:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69323

  9. Benni Mack voted on patch set 4 CR +1 V +1 11/11/24, 21:35

  10. Benjamin Franzke commented on patch set 4 CR +1 11/12/24, 04:59

    stray space
  11. Benjamin Franzke commented on patch set 4 CR +2 V +2 11/12/24, 05:34

    Hm, I don't think we have a testcase for the case that was reported to be broken: thawObjectProperty throws an error if a relation is defined in extbase, but not assigned (`0` in database). We basically test the prerequisites for that to work. …but that's fine by me for now, as I could at least manually verify that the issue is resolved: mapping 0 to NULL works when extbase-defined relations (type=passthrough) are used.

    Reply

    don't care for now…
  12. Benjamin Franzke commented on patch set 4 CR 0 V -1 11/12/24, 05:57

    Reply

    Hm, I could not verify that in the 13.4 backport: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86936/1#message-083267bd90553a2db221a4c6e8db5491620331f4 something seems to be missing for 13.4…
  13. Benjamin Franzke commented on patch set 4 CR +2 V +2 11/12/24, 07:09

  14. Benjamin Franzke merged patch set 5 11/12/24, 07:09