Hi,
I have written a JPA callback that modify some properties of an entity depending on external conditions. The modification is done in a @PrePersist and @PreUpdate callback.
The problem is the callback is never called as Hibernate considers that the entity is not dirty and consequently do not call JPA callback.
I read JPA spec and it is unclear if it is a Hibernate bug. According to you, should Hibernate call @PrePersist and @PreUpdate callback, then check for "dirtyness" of the entity instead of the current implementation where dirty state is checked before actually calling callback?
Regards,
Julien
|