nhibernate左连接linq
我知道NHibernate3.1不支持linq语法的左连接,我们必须使用hql 但有人知道这项功能是否有计划吗?什么时候nhibernate左连接linq,nhibernate,linq-to-nhibernate,Nhibernate,Linq To Nhibernate,我知道NHibernate3.1不支持linq语法的左连接,我们必须使用hql 但有人知道这项功能是否有计划吗?什么时候 谢谢显然没有关于该功能的详细信息 HQL中左连接的一个小示例: var hql = @"select c.IdClient as IdClient, c.Denomination As Denomination, g.IdGriffe as IdGriffe from Client c
谢谢显然没有关于该功能的详细信息 HQL中左连接的一个小示例:
var hql = @"select c.IdClient as IdClient, c.Denomination As Denomination, g.IdGriffe as IdGriffe
from Client c
left outer join c.GriffeClient gc
left outer join gc.Griffe g
with g.IdGriffe = :id
order by c.Denomination";
var retour = session.CreateQuery(hql)
.SetInt32("id", id)
.SetResultTransformer(new NHibernate.Transform.AliasToEntityMapResultTransformer())
.List();
关于如果您正在寻找intellisense支持,您不必使用HQL,也可以使用QueryOver。