Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-660

JPA-like callbacks support in the main Cayenne stack

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0M1, 3.0
    • Core Library
    • 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.

      Attachments

        Issue Links

          Activity

            closing - the issue is logged in 3.0 RELEASE-NOTES

            andrus Andrus Adamchik added a comment - closing - the issue is logged in 3.0 RELEASE-NOTES

            People

              andrus Andrus Adamchik
              andrus Andrus Adamchik
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: