mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1254: EntityGenerator does not respect Class Inheritance properly #1578
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 (Jul 6, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user bigbadbassman:
Hi,
as mentioned here DDC-904, https://github.com/symfony/symfony/issues/1550# and https://github.com/stof/StofDoctrineExtensionsBundle/issues/47
The Doctrine2 EntityGenerator does not respect inheritance of Models correctly, especially when inheriting the primary field from an abstract base class as done by Symfony2's StofDoctrineExtensionsBundle.
This is extremly annoying since it renders the generator unusable when aforementioned bundle is active. It always fails with this message:
[Doctrine\ORM\Mapping\MappingException]
No identifier/primary key specified for Entity 'Stof\DoctrineExtensionsBundle\Entity\Translation'. Every Entity must have an
identifier/primary key.
DDC-904 mentioned this should be fixed, but this is not true: bug is still found in latest Symfony2 git.
The docs only refer to using a single mapping format inside a bundle, but this does not work. Stof... uses xml mappings and it does not matter if i use yml or annotiations in a different bundle - the above error is still present.