Hi.
I have criteria:
ICriteria criteria = Session.CreateCriteria<Entity>()
.SetFetchMode("Entity1", FetchMode.Eager)
.SetFetchMode("Entity2", FetchMode.Select)
.SetMaxResults(max)
.SetFirstResult(min)
.Add(Restrictions.Eq("Available", true))
.CreateAlias("Entity3", "b")//,
NHibernate.SqlCommand.JoinType.InnerJoin)
.Add(Restrictions.Eq("b.Name", variable))
.SetResultTransformer(new
NHibernate.Transform.DistinctRootEntityResultTransformer());
When I execute this query, all fields from Entity3 are returned to.
How can I execute it and have in result only Entity objects with
referenced Entity1 and Entity2 without Entity3?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
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.