mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Doctrine superclass inheritance - indexes are not inherited #5187
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 @nacholibre on GitHub (Jul 10, 2016).
Originally assigned to: @Ocramius on GitHub.
Name index is not inherited from
BaseSuperClass, it there any way to achieve this?@Ocramius commented on GitHub (Jul 11, 2016):
@Table is not valid on a mappedsuperclass.
On 10 Jul 2016 16:46, "Yoan Arnaudov" notifications@github.com wrote:
@nacholibre commented on GitHub (Jul 11, 2016):
Okay, but is there any way to achieve this?
@alexgurrola commented on GitHub (Jan 18, 2017):
@nacholibre or @Ocramius, Did you find a way to inherit indexes with a mapped superclass? I have tons of entities that would benefit from a feature as such.
@Ocramius commented on GitHub (Jan 18, 2017):
Listeners - simply attach a listener that, when the metadata loads, adds the indexes to all classes that are instance of a certain mapped superclass.
@ThomasLandauer commented on GitHub (Feb 2, 2020):
I posted a full solution for the listener suggested by @Ocramius at https://stackoverflow.com/a/60029840/1668200