[PR #10643] Fix single table inheritance with intermediate abstract class(es) #12510

Open
opened 2026-01-22 16:14:15 +01:00 by admin · 0 comments
Owner

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

State: closed
Merged: Yes


We need to make sure to query the discriminator map only with contained classes, otherwise we end up trying to access it with e.g. abstract sub-classes of the current class, which are not to be contained in the discriminator map. This is caused by the introduction of auto-discovering of missing sub-classes in https://github.com/doctrine/orm/pull/10411 which also added abstract classes to ClassMetadata::subClasses.

Fixes #10625
Test based on PR https://github.com/doctrine/orm/pull/10411

**Original Pull Request:** https://github.com/doctrine/orm/pull/10643 **State:** closed **Merged:** Yes --- We need to make sure to query the discriminator map only with contained classes, otherwise we end up trying to access it with e.g. abstract sub-classes of the current class, which are not to be contained in the discriminator map. This is caused by the introduction of auto-discovering of missing sub-classes in https://github.com/doctrine/orm/pull/10411 which also added abstract classes to ClassMetadata::subClasses. Fixes #10625 Test based on PR https://github.com/doctrine/orm/pull/10411
admin added the pull-request label 2026-01-22 16:14:15 +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#12510