0 Replies Latest reply on Jun 3, 2008 12:17 PM by Vassiliy Dubkin

    Advanced trigger mechanism for Entities

    Vassiliy Dubkin Newbie

      I am looking for a "trigger" implementation (similar to database trigger) for entity beans. I had a look on the EventListener and they are quite good in many cases but they have one huge disadvantage - they don't give me access to the old object, since only the current object is passed to the @PreUpdate/@PostUpdate methods.

      Is there any way to get also the old value in JPA or in the JBoss implementation, something like:

      void preUpdate(EntityClass new, EntityClass old) {
       if (new.foo != old.foo) {