任何想法为什么我在执行下面的查询时可能会得到“没有持久性:System.Collections.Generic.List”异常?
var subs = new List<Subsection>();
var subsections = Session.QueryOver<Subsection>()
.WhereRestrictionOn(s => s.Id)
.IsInG(subsectionIds)
.List<Subsection>();
Location foreignExpertLocation = null;
var result = Session.QueryOver<InternationalLawyerExpertise>()
.JoinAlias(i => i.ForeignExpertLocation, () => foreignExpertLocation)
.JoinAlias(() => foreignExpertLocation.Subsections, () => subs)
.AndRestrictionOn(() => subs).IsInG(subsections)
.Where(i => i.ForeignExpertLocation == location && i.Status.Id == _confirmed)
.Fetch(lawyer => lawyer.PersonOrganisation.Person).Eager
.Fetch(lawyer => lawyer.PersonOrganisation.Organisation).Eager
.List<InternationalLawyerExpertise>();
return result;