When doing a query like this (using Nhibernate 2.1.2):
ICriteria criteria = session.CreateCriteria()
.SetFetchMode(\"ChildColl
Try using Futures:
ICriteria criteriaFuture1
= session.CreateCriteria()
.SetFetchMode("ChildCollection1", FetchMode.Eager)
.Add(Restrictions.IdEq(id))
.SetResultTransformer(Transformers.DistinctRootEntity)
.FutureValue();
ICriteria criteriaFuture2
= session.CreateCriteria()
.SetFetchMode("ChildCollection2", FetchMode.Eager)
.Add(Restrictions.IdEq(id))
.SetResultTransformer(Transformers.DistinctRootEntity)
.FutureValue();
return criteriaFuture1.Value;