I'm using Java 8 for my new project.
I'm trying to use new date and time api in java 8 however I don't know if JPA 2.1
fully supports this new Date and Time API or not.
Please share your experience/opinion in JPA`s supports for new date and time API in Java 8.
Can I use new date and time api in Java 8 safely with JPA 2.1?
UPDATE:
I'm using Hibernate (4.3.5.Final) as JPA implementation.
Best Answer
For Hibernate 5.X just add
and
will work without any additional effort. See https://hibernate.atlassian.net/browse/HHH-8844
UPDATE:
Please have a look at Jeff Morin comment: since Hibernate 5.2.x it is enough
See https://github.com/hibernate/hibernate-orm/wiki/Migration-Guide---5.2 and Integrate Hibernate 5.2 with Spring framework 4.x