views:

30

answers:

3

I tried without succes to make a custom type mapping between DateTime joda and DATE db2. Which annotations should we use in the case of using joda time hibernate library instead of custom type mapping ? Thanks a lot

+1  A: 

Why don't you just map plain java dates and convert to / from joda dates when you read / write the values?

seanizer
+1: A perfectly reasonable approach. Though I do use the library as noted in my answer.
Don Roby
+1  A: 

There is an open-source library supporting this on sourceforge. Now that I reread your question, you're likely already using it.

This includes a UserType so that you can map Joda DateTime fields with

   @Type(type="org.joda.time.contrib.hibernate.PersistentDateTime")
Don Roby