I was handed a legacy Spring Hibernate DAO project that was Spring 3.2.0 and Hibernate 3.5.
I converted it upstream to Spring 3.2.3.RELEASE, and Hibernate 4.2.3.Final.
The problem is that they used Joda-Time for peristing date/times to the database, but from what I have read here, joda-time-hibernate 1.3 does not work for Hibernate 4, but only for 3.
So, I looked at the recommended libraries and spent a lot of time converting Joda.DateTime to jadira.PersistentDateTime, but what I found was that Jadira ... IMHO doesn't work that great for my needs. Yes, I can pull objects from the database, and these are Jadira PersistentDateTime fields, this works great.
However, we have lots and lots and lots of date calculations used with joda-time, one for adding days, emoving days, difference between days, before, after calculations, and the list goes on.
So ... I am wondering ... can I convert a joda.DateTime to and from jadira.PersistentDateTime???? I also find the documentation for Jadira non-existent, I find almost no good documentation out there. If someone can point me out to this documentation that would be great.
On the other hand, since I am using Hibernate 4 now, I see no problem with just using a standard java.util.Date for my persistent objects.
Should I stick to jadira, is it worth it? Or should I use the standard reliable java.util.Date with the GregorianCalendar? I am leaning toward the latter since it should be more stable and reliable that some exotic third-party package.
Thanks!
Tom