开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜