mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Why MappedSuperclass can not override another MappedSuperclass #6220
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 @pcabreus on GitHub (Apr 11, 2019).
Originally assigned to: @jwage on GitHub.
Bug Report
Summary
If a create a
MappedSuperclassand then I write anotherMappedSuperclassextending the first one and override some fields, it should works.Current behavior
When I extend from the last one on the Entity, I get an error:
Invalid field override.How to reproduce
I created a dummy example for undestanding:
When I update my schema I get
Invalid field override named 'a' for class 'App\Entity\B'.Expected behavior
A change of default
lengthof columnato140.I have a real problem with
AbstractLogEntryof LoggableGedmoDoctrineExtensionwhich is required by other bundle that I extend from. So my Entity it's on 3rt level.@jwage commented on GitHub (Apr 18, 2019):
I gave this a test and it looks like the AttributeOverrides need to be defined on the Entity and not the MappedSuperclass.
@pcabreus commented on GitHub (Apr 18, 2019):
So it can't be done like this???? Is it impossible??
@jwage commented on GitHub (Apr 18, 2019):
I don't think so. I am not sure if this error is by design or if it should work.