[PR #10387] Make sure the schema tool does not miss columns from abstract entity classes in a STI tree #12320

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

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

State: closed
Merged: No


This PR fixes SchemaTool so it does not miss fields inherited from abstract @Entity classes in the middle of a single table inheritance (STI) tree, when these classes are not listed in the Discriminator Map (DM).

Abstract entitiy classes not listed in the DM will not show up in the root entity's ClassMetadata subClasses property. Fields inherited from them will show up in the field mapping metadata for subclasses, with inherited => ... being set.

The Schema Tool would skip these inherited fields, probably based on the assumption that they will be taken care of when the declaring class is processed. This, however, did not happen for abstract classes not listed in the DM.

Update #10389 discusses whether it should in fact be a requirement to list also abstract classes in the DM, which might make this issue go away (masking it).

Update 2 #10411 fixes this by making sure the missing subClasses are filled in

**Original Pull Request:** https://github.com/doctrine/orm/pull/10387 **State:** closed **Merged:** No --- This PR fixes `SchemaTool` so it does not miss fields inherited from abstract `@Entity` classes in the middle of a single table inheritance (STI) tree, when these classes are not listed in the Discriminator Map (DM). Abstract entitiy classes not listed in the DM will not show up in the root entity's ClassMetadata `subClasses` property. Fields inherited from them will show up in the field mapping metadata for subclasses, with `inherited => ...` being set. The Schema Tool would skip these inherited fields, probably based on the assumption that they will be taken care of when the declaring class is processed. This, however, did not happen for abstract classes not listed in the DM. **Update** #10389 discusses whether it should in fact be a requirement to list also `abstract` classes in the DM, which might make this issue go away (masking it). **Update 2** #10411 fixes this by making sure the missing `subClasses` are filled in
admin added the pull-request label 2026-01-22 16:13:41 +01:00
admin closed this issue 2026-01-22 16:13:41 +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#12320