Issue
I would like to execute certain method every time a specific Entity is persisted. This method should perform some kind of checking on entity object, so its need a access to this specific object.
Is there an Annotation, or other method allowing me to do so? Basically, it should be working like some kind of trigger.
Solution
I think you are looking for this
https://www.baeldung.com/jpa-entity-lifecycle-events
So you can use @PostPersist
inside your entity
Answered By - Dilermando Lima