PS: I posted the wrong query. Here it is:
var groups = ((DtoRepository<GroupDto>)repository).Session
.CreateCriteria<GroupDto>("gr")
.Add(Expression.Eq("gr.IsActive", true))
.CreateAlias("groups.Members", "member")
.Add(Expression.IsNotNull("member.Id"))
.SetFetchMode("gr.Members", NHibernate.FetchMode.Eager)
.SetResultTransformer(new DistinctRootEntityResultTransformer())
.Future<GroupDto>();
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/CXdNIYBBk6EJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.