I have a Class A that have a class B List …
So, with QueryOver I have :
ClassB lb = null;
var result = session.QueryOver<ClassA>
.JoinAlias(x => x.ListB, () => lb, JoinType.LeftOuterJoin)
.Where(() => lb.Property == 1)
.List<ClassA>();
How Can I do that using Nhibernate Query<> ?
Thanks
Paul
Assuming what you want to do is get a list of
ClassAhaving at least oneClassBwithProperty == 1:This wouldn’t be an outer join, though. You might emulate that by adding
|| !a.ListB.Any().