Review 13.4 Merged

86936[BUGFIX] Respect model type configuration in ColumnMapFactory

Benjamin Franzke CR +2 V +2 Hard +249 −23 updated 11/12/24, 07:10

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
  • Verified V +2 Done
    • Benjamin Franzke +2
    • core-ci +1 CI

Issues 2

Files 2

Review log 45

  1. Benjamin Franzke commented on patch set 1 11/12/24, 05:34

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 11/12/24, 05:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69341

  3. Benjamin Franzke commented on patch set 1 V -1 11/12/24, 05:56

    With a type=passthrough relation and 0 value in database I still face: ``` TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::thawObjectProperty(): Return value must be of type ?object, array returned ``` (this was not the case in the `main` patch) @bo@cedev.de can you have a look?
  4. Benjamin Franzke commented on patch set 1 CR +2 V +2 11/12/24, 07:08

    Reply

    Sorry, I had the old `ColumnMapFactory.php` in my staging area in order to test the testcase. This works with the changed `ColumnMapFactory.php` :+1:
  5. Benjamin Franzke merged patch set 2 11/12/24, 07:10