We have just added an example of how to use TRIMM JPA to generate code for Hibernate 4.x (in this case 4.2.4) to our TRIMM-Examples repository. The project is called TrimmHibernate4xMDDExample.
The largest difference from the Hibernate 3.6.x example, called MDDExample, are the following:
- To Persist DateTime and LocalDate (from JODA time) – we now use
org.jadira.usertype.usertype.coreand the latest
This means that we have removed the dependency to
We have therefore added the following Maven jar dependency:
<dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.2</version> </dependency> <dependency> <groupId>org.jadira.usertype</groupId> <artifactId>usertype.core</artifactId> <version>3.1.0.CR8</version> </dependency>