3 Replies Latest reply on Jan 6, 2009 9:21 AM by lpmon

    Entity value already changed in @PreUpdate method

    lpmon Novice


      I need to know the before and after values when an update occurs. I can clearly see using the debugger that when the preupdate annotated method is called the value of interest already has the new value/changed!

      My intent was to save the old value in the @PreUpdate method and then use it during the @PostUpdate for comparison. With this behavior this approach wont work.

      Isn't the entity supposed to have the old value during @PreUpdate method call?

      Using:
      JBoss AS 4.0.5 w/EJB3
      Hibernate 3.2.5
      Seam 1.2.1