mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1156: MappedSuperclass not allowed in the middle of an inheritance hierarchy #1453
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 (May 18, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user holtkamp:
For a Class Table Inheritance mapping configuration, an intermediate MappedSuperclass causes a 'noInheritanceOnMappedSuperClass' mapping exception to be thrown by Doctrine\ORM\Mapping\ClassMetadataFactory::loadMetadata() (line 329). However, the MappedSuperclass only contains some simple properties and no inheritance configuration such as DiscriminatorMap or DiscriminatorColumn settings. The MappedSuperclass DOES extend the upper class in the hierarchy that contains this information using annotations, maybe this way it inherits this inheritance configuration.
The documentation state that a MappedSuperclass can occur in the middle of a inheritance hierarchy.
http://www.doctrine-project.org/docs/orm/2.0/en/reference/inheritance-mapping.html#mapped-superclasses
PS: this mapping seemed to be working fine for me using Doctrine 2.0.4 and Doctrine 2.0.5, further inspection showed that this is not the case. Persistence of an Entity fails, Doctrine wants to update a sequence of the persisted Entity, that does not exist as it is a Class Table Inheritance
PPS: this applies for the 2.1.0-BETA1 release, which is not yet available to create an issue for.