Search code examples
javahibernate-envers

PreUpdate in Hibernate-Envers


To activate post-update listner for envers there is a class EnversPostUpdateEventListenerImpl to extend. It works well. There is also post-collection listners. But there is no pre-update listner. How can i intercept pre-update events?


Solution

  • If you want to intercept pre-update events, simply use the mechanism from Hibernate directly and extend the PreUpdateEventListener. Envers implements some of the listers to provide auditing functionality.