Review main Merged

96849[BUGFIX] Update and remove lazy-loaded objects via repository

Alexander Schnitzler CR +2 V +2 Normal +137 −7 updated 10/23/26, 05:17

Commit message

A native lazy proxy of a to-one relation, for example
Blog::$administrator, cannot be handed to the repository of the
related object. update() throws an UnknownObjectException with
code 1249479819, claiming the object is new, whether the proxy is
still uninitialized or already initialized. remove() followed by
persistAll() silently does not delete the record.

Session::hasObject() looks up the identity map by object instance.
The DataMapper only registers the real instance the proxy resolves
to, so the proxy itself is not known to the Session and is treated
as a new object.

The Session now resolves a native lazy proxy to its real instance
before it looks the object up in the identity map or unregisters
it. An uninitialized proxy is loaded for that, as
Backend::getIdentifierByObject() already did, which now relies on
the Session. If the related record no longer exists, the proxy
still counts as new.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Wouter Wolters +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Wouter Wolters +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 911

  1. Alexander Schnitzler uploaded patch set 1 10/19/26, 06:39

  2. core-ci voted on patch set 1 V -1 10/19/26, 06:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111581

  3. Alexander Schnitzler uploaded patch set 2 V -1 10/19/26, 06:56

  4. core-ci voted on patch set 2 V +1 10/19/26, 07:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111584

  5. Alexander Schnitzler marked it ready for review 10/19/26, 07:11

  6. Alexander Schnitzler wrote 10/19/26, 07:13

    Topic set to extbase
  7. Oliver Klee voted on patch set 2 V +1 10/19/26, 20:49

  8. Simon Schaufelberger voted on patch set 2 CR +1 V +1 10/22/26, 19:05

  9. Wouter Wolters voted on patch set 2 CR +1 V +1 10/22/26, 19:12

  10. Benni Mack voted on patch set 2 CR +2 V +2 10/23/26, 05:17

  11. Benni Mack merged patch set 3 10/23/26, 05:17