NHibernate queryover join tables
I have a question.. How to join two tables tah are related but not have direct relation constraint in nhibernate queryover?
Table1 { ID Title }
Table2 { ID VALUE ALIAS } Table1 and Table2 has not fk relationship constraint. Need to Do something like this:
Select Table1.Title,
Table2.Alais
from Table1
inner join (Select Value from table2 where ALIAS = 'someAlias')
where Table1.ID = T开发者_Go百科able2.Value
Please help thanks.
Have you tried just using the where clause?
Select Table1.Title, Table2.Alais
from Table1, Table2
where Table1.ID = Table2.Value
精彩评论