0
votes

I understand that nhibernate 3.1 does not support left join with the linq syntax and we have to use hql.

But does someone know if that feature is planned ? and when ?

Thanks

1
You don't have to use HQL, you could also use QueryOver, if you are looking for intellisense support. - Florian Lim

1 Answers

0
votes

Apparently no details about that feature

A little example of Left join in 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();

Regards