Find file History
Latest commit 35d549e Sep 5, 2016 @timowest timowest Bump version
Failed to load latest commit information.
etc Normalize line endings to lf Dec 13, 2015
src insertion order for JPA query hints Aug 7, 2016 Update examples in readme to Querydsl 4 syntax May 30, 2016
pom.xml Bump version Sep 5, 2016

Querydsl JPA

The JPA module provides integration with the JPA 2 persistence API.

Maven integration

Add the following dependencies to your Maven project :



And now, configure the Maven APT plugin :


The JPAAnnotationProcessor finds domain types annotated with the javax.persistence.Entity annotation and generates query types for them.

If you use Hibernate annotations in your domain types you should use the APT processor com.querydsl.apt.hibernate.HibernateAnnotationProcessor instead.

Run clean install and you will get your Query types generated into target/generated-sources/java.

If you use Eclipse, run mvn eclipse:eclipse to update your Eclipse project to include target/generated-sources/java as a source folder.

Now you are able to construct JPQL query instances and instances of the query domain model.


Querying with Querydsl JPA is as simple as this :

QCustomer customer = QCustomer.customer;
JPAQuery<?> query = new JPAQuery<Void>(entityManager);
Customer bob =

For more information on the Querydsl JPA module visit the reference documentation