mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #10735] Make it possible to have non-NULLable self-referencing associations when using application-provided IDs #12581
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/10735
State: closed
Merged: Yes
This change improves scheduling of extra updates in the
BasicEntityPersister.Extra updates can be avoided when
NONEgenerator strategy).As a corollary, with this change applications that provide their own IDs can define self-referencing associations as not NULLable.
One caveat, though: In the absence of entity-level commit ordering (#10547), it is not guaranteed that entities with self-references (at the class level) will be inserted in a suitable order. The order depends on the sequence in which the entities were added with
persist().Fixes #7877, closes #7882.
Co-authored-by: Sylvain Fabre sylvain.fabre@assoconnect.com