Support superclass entity callbacks
-----------------------------------
Key: CAY-669
URL: http://issues.apache.org/cayenne/browse/CAY-669
Project: Cayenne
Type: Task
Components: Cayenne Core Library
Versions: 3.0
Reporter: Andrus Adamchik
Assigned to: Andrus Adamchik
Fix For: 3.0
We need an ability to define a callback method in a common superclass of some
entities and register it just once:
LifecycleEventCallbackMap prePersist = ...
prePersist.addListener(MySuper.class, "prePersist");
Then individual entities may choose to override this method if they want to
customize the behavior of callback. Or they may implicitly rely on the
superclass. JPA supports that as "listeners on mapped superclass". Cayenne
doesn't have a formal notion of a mapped superclass (abstract entity would be
the closest), and we can simply support it on any superclass that is registered
explicitly.
(also note that JPA supports "excludes superclass" flag ... not sure if it is
applicable here, as the registration is explicit.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/cayenne/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira