Hi,
I have an object VehicleJob which has a collection of Vehicle instances. Each Vehicle instance can be related to an Invoice object (but may also be null)
I need a query which gets all VehicleJob instances that have one or more Vehicles where Invoice is null.
I've tried the following but I am starting to get confused!
Code:
IQuery q = session.CreateQuery("from VehicleJob as j where exists (select elements(j.Vehicles) where j.Vehicles.Invoice is null)");
Can anyone help with the HQL?
Many thanks.