11.4.5. About the WITH Clause
WITHclause to qualify the join conditions. This is specific to HQL; JPQL does not define this feature.
Example 11.4. with-clause Join Example
select distinct c from Customer c left join c.orders o with o.value > 5000.00
with clauseare made part of the
on clausein the generated SQL as opposed to the other queries in this section where the HQL/JPQL conditions are made part of the
where clausein the generated SQL. The distinction in this specific example is probably not that significant. The
with clauseis sometimes necessary in more complicated queries.