I want to have a function in one of my annotated JPA classes that is called every time the EntityManager stores them in a database (like an event listener). Is it possible? Preferably, I would like to distinguish whether it will just be saved or has just been saved.
To accomplish what I want, this time I probably could work with the setter method, but that would be completely wrong.
source
share