You assumption is correct. Querydsl JPA has the same restrictions as the mentioned three restrictions are also restrictions of JPQL, the query language of JPA.
JPAQuery
is for JPQL queries and JPASQLQuery
is for JPA native (SQL) queries.
Question
JPA Criteria API has some important limitations. For example:
Does QueryDsl querydsl-jpa
suffer from the same limitations?
What about QueryDsl querydsl-sql
?
EDIT:
From the QueryDsl documentation (no concrete experience with it), QueryDsl provides two query-classes JPAQuery
and JPASQLQuery
. The first seems to have the same limitation as JPA Criteria API, but JPASQLQuery
doesn't seem. If I find time, I will dive deeper into code and try it. But if someone already knows something about it, then you are welcome!
Solution
You assumption is correct. Querydsl JPA has the same restrictions as the mentioned three restrictions are also restrictions of JPQL, the query language of JPA.
JPAQuery
is for JPQL queries and JPASQLQuery
is for JPA native (SQL) queries.