DDC-1787: Fix for JoinedSubclassPersister, multiple inserts with versioning throws an optimistic locking exception #2249

Open
opened 2026-01-22 13:46:06 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Apr 18, 2012).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user jack@actinum.nl:

Attached is a small patch for a bug in the file JoinedSubclassPersister.php. When persisting multiple new entities that are subclasses of a baseclass (joined), and having the @Version attribute set, only for the last one a query is run to fetch the new value of the version field. The other one is tested with NULL, and throws an optimistic locking exception.

Originally created by @doctrinebot on GitHub (Apr 18, 2012). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user jack@actinum.nl: Attached is a small patch for a bug in the file JoinedSubclassPersister.php. When persisting multiple new entities that are subclasses of a baseclass (joined), and having the @Version attribute set, only for the last one a query is run to fetch the new value of the version field. The other one is tested with NULL, and throws an optimistic locking exception.
admin added the Improvement label 2026-01-22 13:46:06 +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#2249