mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2415: CustomIdGenerator not inherited from MappedSuperclass #3030
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 (Apr 25, 2013).
Jira issue originally created by user fxgallego:
I had a problem with a CUSTOM id generation mapping definition.
I have an abstract class and @MappedSuperclass which defines the id column as:
The problem is that subclasses doesn't inherits the CustomIdGenerator annotation. I have traced the problem up to ClassMetadataFactory::doLoadMetadata.
I had to change the second inner if statement as
if ($parent->isMappedSuperclass) {
$class->setCustomRepositoryClass($parent->customRepositoryClassName);
$class->setCustomGeneratorDefinition($parent->customGeneratorDefinition); <<<<< LINE ADDED
}
to allow subclasses inherit the customGenerationdefinition.
Aside, the docblock annotation help doesn't includes the CustomIdGenerator tag.
@doctrinebot commented on GitHub (Apr 27, 2013):
Comment created by @FabioBatSilva:
Fixed :
d513e0f084@doctrinebot commented on GitHub (Apr 27, 2013):
Issue was closed with resolution "Fixed"