I have the following criteria search that I would expect to return 1 project with multiple task and contexts and a single user.
What is actually getting returned is the same project multiple times for each different task.
It almost looks like I am missing a statement in the criteria to tell the search to return unique projects.
Any help would be very welcome.
ICriteria criteria = NHibernateSession.Current.CreateCriteria(typeof(Project))
.CreateAlias("User", "user")
.Add(Restrictions.Eq("user.Username", username))
.SetFetchMode("Tasks", FetchMode.Eager)
.SetFetchMode("Contexts", FetchMode.Eager);
IList<Project> projects = criteria.List<Project>();
Thanks in advance...