How to Integrate jOOQ with Hibernate


While jOOQ can be an alternative to Hibernate, it doesn’t have to entirely replace Hibernate. Many users have reported positive experiences when combining jOOQ with Hibernate, letting Hibernate do the tedious CRUD work, and jOOQ the complex querying and reporting through its sophisticated, yet intuitive query DSL.

Vlad Mihalcea who has been blogging interesting stuff about SQL and transaction models recently has now published a very nice tutorial on how to use JPA-annotated entities as a grounds for source code generation in jOOQ, through the following steps:

  • Write the annotated entities
  • Generate HSQLDB DDL from those entities
  • Execute the DDL in an HSQLDB instance
  • Run the jOOQ code generator to reverse-engineer the schema

With the above, he’s ready to query entities through JPA/Hibernate or jOOQ in no time.

Read the full blog post here:
http://vladmihalcea.wordpress.com/2013/12/06/jooq-facts-from-jpa-annotations-to-jooq-table-mappings/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s