mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1205: generate-entities does not work with inheritance and annotations #1514
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 (Jun 13, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user arnaud-lb:
When using inheritance, the generate-entities command fails with messages like No identifier/primary key specified for Entity X. This is because getParentClasses() in DisconnectedClassMetadataFactory always returns an empty array, and the ClassMetadataFactory fails to load parent classes metadata.
Example of mapping that fails with No identifier/primary key specified for Entity Employee:
@doctrinebot commented on GitHub (Jun 13, 2011):
Comment created by @beberlei:
yes, inheritance doesnt work with entity generation. Its mentioned in the help of the command and somewhere in the docs.
@doctrinebot commented on GitHub (Jun 13, 2011):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Jun 13, 2011):
Comment created by arnaud-lb:
Sorry, didn't seen this. The problem is that when using only one inherited class, this avoids from using generate-entities at all on any other entity.
By looking at DisconnectedClassMetadataFactory it looks like it could try harder to load metadata if the class exists:
With this I managed to genarate my new entities. But is also generates some warnings, so I guess the problem is deeper than that.
Thanks for your answer.