Review main Abandoned

89661[BUGFIX] Resolve foreign table record type in Schema API

Oli Bartsch CR 0 V 0 Hard +250 −140 updated 06/10/25, 11:17

Commit message

TCA allows defining a type field from a foreign
table using the `local_field:foreign_field` syntax.
An example is `sys_file_reference`, which defines
`uid_local:type`, where `uid_local` references the
foreign table `sys_file`.

To support this, a new `ForeignTableFieldType` is
introduced. It is created by `FieldTypeFactory`,
based on detection in `TcaSchemaFactory` when
encountering a local:foreign pattern.

The new field type provides:

- foreign field configuration
- foreign table name
- local and foreign field names
- foreign field type impelmentation class name

Some parts of the system cannot handle this,
as resolving foreign fields require a table
lookup. This is not always possible in static
contexts or when no DB access is available.

To handle these cases, the method
`hasLocalSubSchemaDivisorField()` is added
to `TcaSchema`, allowing for proper distinction.

Some "@todo"'s are added to identify and review
places where resolving the foreign table at
runtime might be feasible.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 19

Review log 47

  1. Oli Bartsch uploaded patch set 1 06/06/25, 10:54

  2. core-ci voted on patch set 1 V -1 06/06/25, 11:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79983

  3. Oli Bartsch uploaded patch set 2 V -1 06/06/25, 11:26

  4. core-ci voted on patch set 2 V -1 06/06/25, 11:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79984

  5. Oli Bartsch commented on patch set 3 V -1 06/06/25, 11:55

    Published edit on patch set 2.
  6. core-ci voted on patch set 3 V +1 06/06/25, 12:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79992

  7. Oli Bartsch abandoned the change 06/10/25, 11:17