NHibernate交集 [英] NHibernate intersection
本文介绍了NHibernate交集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在nhibernate中进行交集? 是
How can i do intersection in nhibernate? is
select enterprise.Id
from Enterprises
intersect
select enterpiseID
from vEnterprise
推荐答案
它当前不支持联合或 相交.
It doesn't currently support union or intersect.
_
您可以使用命名的sql-query并执行 原始SQL中的联合. NHibernate将 能够填充实体实例 从SQL查询,并返回那些 查询结果.请参见 此处 和 此处 .
You could use a named sql-query and do the union in raw SQL. NHibernate will be able to populate entity instances from the sql-query and return those as the query result. See here and here.
这篇关于NHibernate交集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文