Persisting Joda DateTime instead of Java Date in Hibernate

前端 未结 4 1820
一整个雨季
一整个雨季 2021-02-05 13:22

My entities currently contain java Date properties. I\'m starting to use Joda Time for date manipulation and calculations quite frequently. This means that I\'m constantly hav

4条回答
  •  情话喂你
    2021-02-05 13:53

    Joda Time Hibernate can be used with recent Hibernate releases - you may need a little bit of tweaking your dependency graph thats all (e.g. setting exclusions). Can I also suggest you look at User Type, which I have released onto Sourceforge. This provides User Types for Joda Time which aim to avoid the client offset issue you mentioned. I would welcome any feedback you have on that project. https://sourceforge.net/projects/usertype/files/

    Regards Chris.

提交回复
热议问题