#113383 by jimmydanger
Thu Jun 03, 2010 5:34 pm
Thu Jun 03, 2010 5:34 pm
How do you do an NHibernate inner join query? Should I use a subquery(DetachedCriteria), CreateCriteria or CreateAlias? Too many unhelpful examples when Googled. Here's the SQL:
select *
from contractdetails cd
inner join
contractheaders ch
on cd.contract_num = ch.contract_num
and cd.vendor_no = ch.vendor_no
and ch.chain_code = 'TA'
where
cd.item_no = '054064'
and cd.effective_price_date < '6/3/2010'
and cd.item_end_date > '6/3/2010'
select *
from contractdetails cd
inner join
contractheaders ch
on cd.contract_num = ch.contract_num
and cd.vendor_no = ch.vendor_no
and ch.chain_code = 'TA'
where
cd.item_no = '054064'
and cd.effective_price_date < '6/3/2010'
and cd.item_end_date > '6/3/2010'




