I use Hibernate and Joda Time with support for the UserType library.
I can save my dates using the following approach:
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentDateTime") @Column private DateTime startDate;
However, I am wondering if this mapping can be defined somewhere somewhere, and not on every instance of the DateTime type.
When switching from Hibernate 3.4 β 4.0, I had to switch from JodaTime Hibernate to UserType, I do not want type declarations to be littered in the entire domain model.
source share