[PR #11934] Fix JoinedSubclassPersister when multiple entities are inserted #13350

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

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

State: closed
Merged: Yes


Same fix as in base/BasicEntityPersister class - https://github.com/doctrine/orm/blob/2.20.3/src/Persisters/Entity/BasicEntityPersister.php#L310. Missed in https://github.com/doctrine/orm/pull/10735.

I have extracted this from reworked #8260 which will target v3.x.

The fix can be verified by modifying UnitOfWork to execute BasicEntityPersister::executeInserts() for multiple entities at once for the same entity class/persister instance - https://github.com/doctrine/orm/blob/2.20.3/src/UnitOfWork.php#L1186 - then reproducible on Doctrine\Tests\ORM\Functional\Ticket\GH10531Test::testInserts test.

As extending/modifying UnitOfWork in tests in not easily possible, I submit this fix for v2.x without a test.

**Original Pull Request:** https://github.com/doctrine/orm/pull/11934 **State:** closed **Merged:** Yes --- Same fix as in base/BasicEntityPersister class - https://github.com/doctrine/orm/blob/2.20.3/src/Persisters/Entity/BasicEntityPersister.php#L310. Missed in https://github.com/doctrine/orm/pull/10735. I have extracted this from reworked #8260 which will target v3.x. The fix can be verified by modifying UnitOfWork to execute `BasicEntityPersister::executeInserts()` for multiple entities at once for the same entity class/persister instance - https://github.com/doctrine/orm/blob/2.20.3/src/UnitOfWork.php#L1186 - then reproducible on `Doctrine\Tests\ORM\Functional\Ticket\GH10531Test::testInserts` test. As extending/modifying UnitOfWork in tests in not easily possible, I submit this fix for v2.x without a test.
admin added the pull-request label 2026-01-22 16:16:53 +01:00
admin closed this issue 2026-01-22 16:16:53 +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#13350