i am trying to query the following data using querydsl. All works fine except the OneToMany properties like review.criteria.
I need to leftjoin the review.criteria where review.id equals to criterion.review.id, so i suppose i need to use a subquery in leftjoin.
By default querydsl / jpa does not support this. Any idea how to do this?
Here is the code:
BlazeJPAQuery<Review> reviewJPAQuery = new BlazeJPAQuery<Tuple>(entityManager, cbf)
.select(review).from(review)
.leftJoin(review.configElement, configElement).fetchJoin()
.leftJoin(configElement.node, node).fetchJoin()
.leftJoin(node.project, project).fetchJoin()
.leftJoin(review.milestone, milestone).fetchJoin()
.leftJoin(review.criteria, criterion).fetchJoin()
.where(globalReviewsFilter)
.orderBy(orderSpecifiers);
As a note, i implemented also blaze persistence because it's supposed that it supports subqueries in joins, but the documentation confuses me. The joins are done more or less in from clause, that in my case doesn't help much.