Mar 12th, 2013, 02:59 PM
Auditable or something else?
I've a small application client/server. I'm using Java Fx2.2+Spring+Hibernate+GraniteDs.
I've several service that extends JpaRepository; so I have not to implements any method because the standars methods are enough for me.
I've several entity bean and I'd like to add createdDate,lastModifiedBy,lastModifiedDate fields so every time I save an object I'd like these fields are compiled automatically.
I know that a way is my entity bean implements Auditable<String, Long> but I can't because this interface use JodaDateTime that I can't serialize in my beans.
There is another way to obtain the same result without have to modify all my services (there are really much) and obtain that every time is called the save() or saveAndFLush() methods, the fields above are populated?
Thanks very much
Tags for this Thread