mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-21 21:14:12 +08:00
#330 Update README.md for JPA
This commit is contained in:
parent
ed1cb4e173
commit
fd5e20abe5
@ -1,3 +1,5 @@
|
||||
# Querydsl JPA #
|
||||
|
||||
The JPA module provides integration with the JPA 2 persistence API.
|
||||
|
||||
**Maven integration**
|
||||
@ -60,10 +62,14 @@ If you use Eclipse, run mvn eclipse:eclipse to update your Eclipse project to in
|
||||
|
||||
Now you are able to construct JPQL query instances and instances of the query domain model.
|
||||
|
||||
** Example query **
|
||||
**Example query**
|
||||
|
||||
Here is an example query using the default variable of the QCustomer class
|
||||
|
||||
QCustomer customer = QCustomer.customer;
|
||||
JPAQuery query = new JPAQuery(entityManager);
|
||||
Customer bob = query.from(customer)
|
||||
.where(customer.firstName.eq("Bob"))
|
||||
.uniqueResult(customer);
|
||||
.uniqueResult(customer);
|
||||
|
||||
For more information on the Querydsl JPA module read the reference documentation http://www.querydsl.com/static/querydsl/latest/reference/html/ch02.html#jpa_integration
|
||||
Loading…
Reference in New Issue
Block a user