mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3568: Discriminator column in joined multiple inheritance #4388
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Feb 16, 2015).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user anooxy:
I'm facing an issue when trying to use multiple inheritance via discriminators. When generating a schema, only the superclass has a discriminator column.
See my test case: https://github.com/anooxy/doctrine-multiple-inheritance-test
The hierarchy is supposed to be (inheriting order):
TutorContact -> TutorStudentChildrenContact -> Contact
StudentContact -> StudentChildrenContact -> TutorStudentChildrenContact & StudentParentContact -> Contact
ParentContact -> StudentParentContact -> Contact
ChildrenContact -> StudentChildrenContact -> TutorStudentChildrenContact -> Contact
Only Contact table has a discriminator column, whereas the middle tables, which have been assigned a discriminator in the annotations, do not have one.
@doctrinebot commented on GitHub (Feb 16, 2015):
Comment created by @ocramius:
This is the expected behavior: only the root of the inheritance has the discriminator column.
@doctrinebot commented on GitHub (Feb 16, 2015):
Issue was closed with resolution "Invalid"
@doctrinebot commented on GitHub (Sep 9, 2015):
Comment created by FrankHouweling:
Pleas consider mentioning this behaviour in the documentation. I spend quite some time struggling with multiple layer inheritance before I found this page.