The first query will return orders that are not associated with customers and the second one will not
1. select o from Order o where 10000<ALL (Select a.balance from o.customer c join c.account a)
2. select o from Order o JOIN o.customer c where 10000< ALL(Select a.balance from c.accounts a)
I think query 1 will return order that are associated with customers.
Note that joins involving the derived subquery root do not affect the join conditions of the containing query.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your databasehttps://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database