diff --git a/querydsl-jpa/README.md b/querydsl-jpa/README.md index a6500a23c..e2541f749 100644 --- a/querydsl-jpa/README.md +++ b/querydsl-jpa/README.md @@ -6,24 +6,26 @@ The JPA module provides integration with the JPA 2 persistence API. Add the following dependencies to your Maven project : - - com.mysema.querydsl - querydsl-apt - ${querydsl.version} - provided - - - - com.mysema.querydsl - querydsl-jpa - ${querydsl.version} - +```XML + + com.mysema.querydsl + querydsl-apt + ${querydsl.version} + provided + - - org.slf4j - slf4j-log4j12 - 1.6.1 - + + com.mysema.querydsl + querydsl-jpa + ${querydsl.version} + + + + org.slf4j + slf4j-log4j12 + 1.6.1 + +``` And now, configure the Maven APT plugin : @@ -68,10 +70,12 @@ Now you are able to construct JPQL query instances and instances of the query do Querying with Querydsl JPA is as simple as this : - QCustomer customer = QCustomer.customer; - JPAQuery query = new JPAQuery(entityManager); - Customer bob = query.from(customer) - .where(customer.firstName.eq("Bob")) - .uniqueResult(customer); - +```JAVA +QCustomer customer = QCustomer.customer; +JPAQuery query = new JPAQuery(entityManager); +Customer bob = query.from(customer) + .where(customer.firstName.eq("Bob")) + .uniqueResult(customer); +``` + For more information on the Querydsl JPA module visit the reference documentation http://www.querydsl.com/static/querydsl/latest/reference/html/ch02.html#jpa_integration