I upgraded my Project to NH5 last week. Now I have a question about a Message I have never seen before: "Session has already been garbage collected"
My code was Querying through lazy linked (many-to-one/one-to-many) Entities via LINQ. Everything worked without Exception in the past (with NH4). A customer reported me this message. I personally have never seen it... StackTrace of my customer report: Message:An error has occurred.,ExceptionMessage:Session has already been garbage collected,ExceptionType:System.InvalidOperationException,StackTrace: bei NHibernate.Linq.DefaultQueryProvider.get_Session() bei NHibernate.Linq.DefaultQueryProvider.PrepareQuery(Expression expression, IQuery query) bei NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression) bei NHibernate.Linq.DefaultQueryProvider.Execute[TResult](Expression expression) bei Remotion.Linq.QueryableBase`1.GetEnumerator() bei System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext() bei System.Linq.Enumerable.<DistinctIterator>d__63`1.MoveNext() bei System.Linq.Buffer`1..ctor(IEnumerable`1 source) bei System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) bei MediaServices.Services.Implementation.ServiceBaseWebApi.FillModelExtras(Asset[] assets) bei MediaServices.Services.Implementation.OfferService.OfferGalery(Int64 offerProgramId) My code in OfferGalery loads some entiteis from database with a Session.Query<xxx>().Where... Statement. Then I Fill my Model (FillModelExtras) navigating through the loaded entities and lazy-sub-entities. Under which conditions does this Message come up? And what can I do to avoid it? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
