compare(jpql, o);
}
public void testCorrelatedSubquerySpecialCase2() {
DomainObject o = qb.createQueryDefinition(Order.class);
DomainObject c = o.join("customer");
DomainObject a = qb.createSubqueryDefinition(c.get("accounts"));
o.select(o)
.where(o.literal(10000).lessThan(a.select(a.get("balance")).all()));
String jpql = "select o from Order o JOIN o.customer c"
+ " where 10000 < ALL "
+ " (select a.balance from c.accounts a)";