mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3273: EntityGenerator writes @ORM\Table annotation for mapped superclass #4050
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 (Aug 26, 2014).
Originally assigned to: @Majkl578 on GitHub.
Jira issue originally created by user jakabadambalazs:
file /doctrine/orm/lib/Doctrine/ORM/Tools/EntityGenerator.php method: generateTableAnnotation returns @ORM\Table annotation even for mapped superclass entities. Since classes with annotation @ORM\MappedSuperclass are only to be extended and will NOT have a database table associated to them they should not have '@ORM\Table' annotation at all.
It would be enough to wrap the method body with
if ($metadata->isMappedSuperclass) { ... }.@doctrinebot commented on GitHub (Aug 26, 2014):
@Majkl578 commented on GitHub (Dec 19, 2017):
EntityGenerator will be dropped in Doctrine 3.0.