Persist Joda-time's DateTime via Hibernate

#hibernate #jodatime
author's avatar
Kees de Kooter
Today 12:30

For Hibernate 3 add the following annotation to your date field:


Hibernate will now do the dirty work for you.

(Make sure you have joda-time-hibernate.jar in your classpath)


For Hibernate 4 and 5 add the following annotation:


(Make sure you have jadira-usertype-core.jar in your classpath)