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