After a bit more investigation, it seems that as soon as I add an alias for a parent entity then it restricts results to rows where that parent is not null. so:
ISession s = ....
ICriteria c = s.CreateCriteria(typeof(ChildEntity));
c.CreateAlias("Parent1", "alias1");
c.CreateAlias("Parent2", "alias2");
// Just by doing this I have restricted results to rows with Parent1 != null and Parent2 != null.
I'm still going through the documentation to see where this is explained.
Any pointers anyone?
Cheers,
Guido Tapia
|