All posts in Uncategorized

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.

If you are new to TRIMM JPA, check out this tutorial on how to use it

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.core and the latest joda-time version.
    This means that we have removed the dependency to joda-time-hibernate.
  • We have therefore added the following Maven jar dependency:


    Read more

If you don’t provide a hand coded rootMappedSuperClass then you need to specify both a inheritanceStrategy and a idStrategy:

  implementation: dk.tigerteam.mdsd.jpa.DefaultJpaInheritanceAndClazzesStrategy
  implementation: dk.tigerteam.mdsd.jpa.DefaultJpaIdStrategy

Both the inheritanceStrategy and the idStrategy parameters accept a FQCN (Fully Qualified Class Name) for a class on the generator class path (e.g. specifying a in your Maven pom) or a project relative path for a .groovy script.
Read more