2012/11/30 hamburger <[email protected]>:

>
> Now to the problem. When I execute the query in my DataAccess-Layer with
> query.GetExecutableQueryOver(session) the generated SQL says that the
> reference to B was loaded.
> But if I want to access the Property B a
> NHibernate.LazyInitializationException will be thrown. I think it has
> something to do with my session. At the time I want access the property B my
> session is already closed. When I debug the query result and look at the
> generated proxy-class I found a non-public field __interceptor which holds
> the TargetInstance. In this TargetInstance my eager-Loaded Property B is
> set.
>
> Is there a possibility to access the eager loaded references after the
> session is closed?


You are hitting a known bug: https://nhibernate.jira.com/browse/NH-3047

Eager loading and access after the session is closed doesn't work with
lazy="no-proxy".

/Oskar

-- 
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.

Reply via email to