1

是否可以使用 NHibernate 的条件 API 获取以下 SQL 查询?

SELECT a.someColumn FROM aTable a LEFT OUTER JOIN (SELECT * FROM bTable WHERE xyz = 'something') b on a.Id = b.Id
4

1 回答 1

0

You can perform a SQL sub-select using NHibernate DetachedCriteria like explained here. For the query you provided, why not just do:

SELECT a.someColumn FROM aTable a LEFT OUTER JOIN bTable b on a.Id = b.Id WHERE b.xyz = 'something'
于 2012-10-08T22:29:02.497 回答