Could you paste some (minimal) code illustrating the problem please?
/Pete From: [email protected] [mailto:[email protected]] On Behalf Of hoghweed Sent: 17 December 2012 09:54 To: [email protected] Subject: [nhusers] Lazy loading lazy=extra no session or session was cosed Hi, I have a strange behavior which I can find any solution for days.. The behavior I experience is the classic LazyInitializationException with "no session or session was closed" which is usual when there's no contextual session and trying to access lazy loaded properties/collections, when I trying to access lazy collections with "extra" lazy mode The context is: * Session-per-request session bounded with Spring.NET OpenSessionInViewModule * Entities with collection as "list" (mapping list collection) with lazy="extra" or with "set" (mapping set collection) * The issue is caused mainly with lazy=extra * It seems that the Count statement for extra cound be done, but accessing the whole collection throws the exception After investingating the usual issues, no session opened, a call made to Session.Clear or Evict, I found no explicit reasons of why this happen.. A strange behavior is if I profile in NHprof, I see the exception in a new session, in other words, the contextual session works correctly, but when the exception is thrown, that exception is visualized in a secondary sessoin.. but NO code open a session, and a single, contextual session is opened.. Anyone knows what other reasons could cause a situation like that? Thanks in advance -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/Lpa9EMgyt8EJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en. !DSPAM:1,50ceebb874171169385064! -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
