mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1127: LifeCycleCallbacks for parent classes #1411
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 (Apr 27, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user jasper:
LifeCycleCallbacks for parent classes do not work anymore.
Before, I used RC2 and declared a class Model which is not an entity, but the parent class of all my models. This class depends on LifeCycleCallbacks and has a few @PrePersist / @PreUpdate methods that apply for all the subclasses. However, due to the fact that the latter version of Doctrine only supports LifeCycleCallbacks from the actual class itself, makes this impossible.
Could this maybe become an option? I now did a quick fix by omitting the second check in line 396 in the Doctrine\ORM\Mapping\Driver\AnnotationDriver: