Search code examples
javahibernatespring-data-jpaevent-listener

Hibernate Event Listeners PreUpdate vs PreInsert


What is the difference between the PreInsertEventListener and the PreUpdateEventListener? Where do I read about the various EventListeners and what they do ?


Solution

  • PreInsertEventListener is called before inserting an item in the datastore.

    PreUpdateEventListener is called before updating the datastore.

    Some of the Event Listeners can be found from here.