Hi,
Suppose I want to do a left join between two tables. One way to go with SQL
could be:
session.CreateSQLQuery("SELECT {a.*}, {b.*} FROM EntityA a LEFT JOIN EntityB b
ON b.SomeColumn = a.AnotherColumn")
.AddEntity("a", typeof(EntityA))
.AddEntity("b", typeof(EntityB))
.List<Object[]>();
However, I can't find a way to do the same with Criteria - that is, have a
projection that returns two entities. I am stuck at:
session.CreateCriteria<EntityA>("a").CreateAlias("AnotherEntity", "b",
JoinType.LeftOuterJoin).SetProjection(...).List<Object[]>();
Is there any way to do this?
Thanks!
RP
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.