DDC-3273: EntityGenerator writes @ORM\Table annotation for mapped superclass #4050

Closed
opened 2026-01-22 14:34:22 +01:00 by admin · 2 comments
Owner

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) { ... }.

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) { ... }`.
admin added the BugWon't Fix labels 2026-01-22 14:34:22 +01:00
admin closed this issue 2026-01-22 14:34:22 +01:00
Author
Owner

@doctrinebot commented on GitHub (Aug 26, 2014):

@doctrinebot commented on GitHub (Aug 26, 2014): - is referenced by [DDC-3418: Indexes not inherited from mapped superclass](http://www.doctrine-project.org/jira/browse/DDC-3418)
Author
Owner

@Majkl578 commented on GitHub (Dec 19, 2017):

EntityGenerator will be dropped in Doctrine 3.0.

@Majkl578 commented on GitHub (Dec 19, 2017): EntityGenerator will be dropped in Doctrine 3.0.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4050