Hello guys, We are migrating a legancy system to .Net and we use NHibernate on the Data Access Layer.
I would like to know, how can we do a inner join with a subquery with QueryOver? For sample:
wo.description,
op.total
from work_order wo
inner join (select o1.operation_id, sum(o2.amount * o2.unit_price) total
from operation o1
inner join operation_item o2 on o2.operation_id = o1.id group by oo.work_order_id) op
on op.work_order_id = wo.id
We have been using QueryOver and it works great for our scenarios, but we have one that is a little more complicated like this (and we will have more like this).
We know we can built a subQuery on the from clausule, but, we want a better query.
Thank you.
--
______________________________________
Felipe B Oriani