I am using spring data jpa and querydsl and trapped on how to write simple nice query to left join two tables. Suppose I have an Project entity and a Task entity with OneToM
If you want to express a constraint on tasks then you can do it like this
QProject.project.tasks.any().id.eq(searchTerm)
If you want to express preloading of certain tasks instead via a left join you can't express that via a Predicate. A Predicate in Querydsl is a boolean expression for the where, join-on and having parts of the query.