All posts in Hibernate

* Updated the 25th of October to include information on CreateCommand vs. Command stereotype handling for the TrimmCQRS plugin.

The first Maven snapshot of TRIMM 1.0.1 is available from our Maven Repository.

The changes in the core API revolve around enhancements the MetaModel and CodeModel, no breaking API changes.

The biggest change is the addition of the TrimmCQRS which supports Model Driven code generating of AxonFramework (a Java based CQRS framework) based CQRS code.

TrimmCQRS comes with a matching TrimmCQRSMavenPlugin that can be used to drive the codegeneration.

There’s also an TrimmCQRS example project available called TrimmCQRSAxonAddressBookExample which models and generates code that implement the same features and structure of the Axon AddressBook example.
Read more

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:

           <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>
          

    Read more