Issues

Select view

Select search mode

 
26 of 26

ReadOnly without lazyInitializer.IsReadOnlySettingAvailable in TwoPhaseLoad.cs

Incomplete

Description

Bug-Scenario:

  • 2 component-types of the same datatype in one union-subclass

  • lazy="true" in uni-subclass definition

  • proxyfactory.factory_class: NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle

  • NH 3.1.0GA

The "((INHibernateProxy) proxy).HibernateLazyInitializer.ReadOnly"-Property throw a exception, because
the session in the lazyInitializer is null.

Exception: "Proxy is detached (i.e, session is null). The read-only/modifiable setting is only accessible when the proxy is associated with an open session."

A similar bug was reported here: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5871
The same fix will remove this error in nhibernate.
The solution is to use "lazyInitializer.IsReadOnlySettingAvailable".

I have posted the same bug here: http://groups.google.com/group/nhusers/browse_thread/thread/d223e79b81a7be41

Environment

None

Attachments

3

Details

Assignee

Reporter

Labels

Components

Priority

Who's Looking?

Open Who's Looking?
Created May 6, 2011 at 12:58 AM
Updated April 27, 2017 at 4:11 AM
Resolved April 27, 2017 at 4:11 AM

Activity

Show:

Alex ZaytsevApril 27, 2017 at 4:11 AM

Closing as incomplete. If wish to reopen the issue please submit a failing test case.

Phillip ConradMay 17, 2011 at 4:09 AM

I have made a unit-test for this scenario. But at the moment i can't reproduce the error.
If I have more time again, I will try to extract the error from our business application.

Fabio MauloMay 6, 2011 at 7:03 AM

Thanks for the image, it is fundamental to understand how reproduce the issue.

Who's Looking?
Loading...