开发者

NHibernate intersection

开发者 https://www.devze.com 2023-01-17 13:54 出处:网络
How can i do intersection in nhibernate? is sele开发者_如何学JAVAct enterprise.Id from Enterprises

How can i do intersection in nhibernate? is

sele开发者_如何学JAVAct enterprise.Id 
from Enterprises

intersect

select enterpiseID 
from vEnterprise


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.

0

精彩评论

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

关注公众号