@PreUpdate
event is triggered just before database UPDATE operation is executed for the entity in question.
If you're not updating direct properties of Employee
, there's no UPDATE
to execute for its table and thus @PreUpdate
listener is never called. You should have better luck using @PrePersist
event which is triggered by "flush" rather than "update".