Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0
-
None
Description
JPA specification defines callbacks similar to our 1.1 DataContext events that can be invoked either on an entity object or on an arbitrary class on commit:
PrePersist
PostPersist
PreRemove
PostRemove
PreUpdate
PostUpdate
PostLoad
With nested channels (CAY-658) and ObjectContext interface it should be possible to create iterceptors for all these callbacks that are external to DataContext or any other Cayenne classes. "PrePersist" and "PreRemove" (and possibly "PreUpdate" can go in an ObjectContext interceptor, the rest in a DataChannel (specifically DataDomain) interceptor. No JPA or JDK1.5 dependencies are needed to implement that.
closing - the issue is logged in 3.0 RELEASE-NOTES