Hi Felipe (sorry for so late reply

)
the IN clause is used to determine whether an item exist in the list so (o.lineItems) is empty nothing would be return from the query the same happens with the
ejb -ql
SELECT OBJECT (o) FROM Order o WHERE o.lineItems IS NOT EMPTY.