Hi,
I need help with an nhibernate query. I would prefer to use Criteria API if possible, otherwise HQL is ok.
I have an Employee object with an Account object property, the Account has a collection of Entry objects, and each Entry has an Amount property. (see class diagram).
http://www.threeboxes.com.au/employeeQuery1.jpg
I need a query that will return all employees who have an account where the sum of the Entry.Amount is less than zero.
Any ideas?