From: Phillip C. (JIRA) <nh...@gm...> - 2011-05-06 07:58:59
|
ReadOnly without lazyInitializer.IsReadOnlySettingAvailable in TwoPhaseLoad.cs ------------------------------------------------------------------------------ Key: NH-2696 URL: http://216.121.112.228/browse/NH-2696 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.2.0Alpha2, 3.2.0Alpha1, 3.1.0 Reporter: Phillip Conrad Priority: Major Attachments: nh-bug-scenario.png, TwoPhaseLoad.fix.cs 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 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |