1
任何人都可以解釋爲什麼這個查詢將返回12家公司(有12名UserAccessList兒童)NHibernate的取返回多個父對象
var list = session.QueryOver<Company>()
.Where(x => x.Id == 1) //x => x.Id.IsIn(ids))
.Fetch(l => l.UserAccessList).Eager()
.List<Company>();
見這個問題的答案 http://stackoverflow.com/questions/6221362/am-i-doing-something-wrong-with-nhibernate-query-over-fetch/6224217#6224217 – hazzik