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?