NHibernate intersection

吃可爱长大的小学妹 提交于 2019-12-13 14:41:46

问题


How can i do intersection in nhibernate? is

select enterprise.Id 
from Enterprises

intersect

select enterpiseID 
from vEnterprise

回答1:


http://www.hibernate.org/117.html#A21

It doesn't currently support union or intersect.

_

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.



来源:https://stackoverflow.com/questions/3803325/nhibernate-intersection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!