Outer joins with ON conditions in JPA
问题 I need a criteria query for the following SQL query. SELECT w.weight_id, w.weight, zc.charge FROM weight w LEFT OUTER JOIN zone_charge zc ON w.weight_id=zc.weight_id AND zc.zone_id=? <------- ORDER BY w.weight ASC The corresponding JPQL query would be like, SELECT w.weightId, w.weight, zc.charge FROM Weight w LEFT JOIN w.zoneChargeSet zc WITH zc.zone.zoneId=:id <------- ORDER BY w.weight I can't reproduce the same with criteria especially WITH zc.zone.zoneId=:id . The following criteria query