[PR #1338] [DDC-3619] Update identityMap when entity gets managed again #9396

Closed
opened 2026-01-22 16:04:11 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1338

State: closed
Merged: No


http://www.doctrine-project.org/jira/browse/DDC-3619

When using SoftDeleteable doctrine extension, an entity can be scheduled
for deletion, then persisted before flushing. In such a case, the entity
was removed from the unit of work identity map and no reference was
hold. This could lead to spl_object_hash collisions, and prevent
another, new entity to be persisted later.

This fix makes sure the unit of work identity map holds a reference to
the entity after it has been soft-deleted.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1338 **State:** closed **Merged:** No --- http://www.doctrine-project.org/jira/browse/DDC-3619 When using SoftDeleteable doctrine extension, an entity can be scheduled for deletion, then persisted before flushing. In such a case, the entity was removed from the unit of work identity map and no reference was hold. This could lead to spl_object_hash collisions, and prevent another, new entity to be persisted later. This fix makes sure the unit of work identity map holds a reference to the entity after it has been soft-deleted.
admin added the pull-request label 2026-01-22 16:04:11 +01:00
admin closed this issue 2026-01-22 16:04:12 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9396