I've hit a blocker adding a fix to an existing project.the main problem is that i'll like to use @Prepersist
and @PreUpdate
in the POJO
to take care of LastModified
field (insert and update) using hibernate implementation of JPA with session.
Reason ?:
That change is required because there is a need to use liquibase 1.9.5
and i know (since i've faced this before) that liquibase translate timestamp fied to datetime with default current_timestamp, and that is too bad for mysql database.
So i needed a way to have this set in code rather than in database so i could safely change timestamp field to datetime.then liquibase is happy, i'm happy.
Now it seems that those interpreters are not been executed, with little search i found out that it's suitable using entityManager
.That is currently out of question.So i'll like to know if is there a SIMPLE way around my problem, meaning having @Prepersist
or @PreUpdate
or even other workaround to set the lastModified
field still using session