views:

22

answers:

0

I am stumped trying to do a query like this SQL query with the NHibernate criteria interface:

SELECT * FROM TimeTrack t JOIN Customer c on c.ID = t.CustomerID WHERE t.StartTime + t.EndTime < c.MaxTime

I know I can do it with HQL, but I also need to conditionally change the query which is perfect for criteria.

I suppose I could put a property on the TimeTrack domain object to do the sum, but I'd rather not.

Is this possible to do with the criteria interface?