From: NHibernate J. <mik...@us...> - 2006-11-02 09:03:31
|
[ http://jira.nhibernate.org/browse/NH-719?page=all ] Sergey Koshcheyev closed NH-719: -------------------------------- Resolution: Fixed > Caching of "any" reference to lazy classes > ------------------------------------------ > > Key: NH-719 > URL: http://jira.nhibernate.org/browse/NH-719 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.0.2, 1.2.0.Alpha1 > Reporter: Cris Constantin > Fix For: 1.0.3, 1.2.0.Beta1 > Attachments: NH719.patch, NH719.zip > > Consider these the mappings: > <class name="C" lazy="false"> > <any name="Owner" id-type="Int32" meta-type="Char"> > <meta-value value="b" class="A"/> > <meta-value value="a" class="B"/> > <column name="OwnerType"/> > <column name="OwnerID"/> > </any> > .... > </class> > <class name="A" lazy="true"/> > <class name="B" lazy="true"/> > With all classes A, B, and C being cached. > The stack trace while trying to load an object of class C from the cache > ERROR NHibernate.Proxy.LazyInitializer [(null)] - Exception initializing proxy [C#1] > NHibernate.MappingException: Unknown entity class: CProxyTypeA_INHibernateProxy1 > at NHibernate.Impl.SessionFactoryImpl.GetPersister(Type theClass) > at NHibernate.Impl.SessionImpl.GetClassPersister(Type theClass) > at NHibernate.Impl.SessionImpl.DoLoadByClass(Type clazz, Object id, Boolean checkDeleted, Boolean allowProxyCreation) > at NHibernate.Impl.SessionImpl.Load(Type clazz, Object id) > at NHibernate.Type.ObjectType.Assemble(Object cached, ISessionImplementor session, Object owner) > at NHibernate.Impl.CacheEntry.Assemble(Object[] values, Object result, Object id, IClassPersister persister, IInterceptor interceptor, ISessionImplementor session) > at NHibernate.Impl.CacheEntry.Assemble(Object instance, Object id, IClassPersister persister, IInterceptor interceptor, ISessionImplementor session) > at NHibernate.Impl.SessionImpl.AssembleCacheEntry(CacheEntry entry, Object id, IClassPersister persister, Object optionalObject) > at NHibernate.Impl.SessionImpl.DoLoad(Type theClass, Object id, Object optionalObject, LockMode lockMode, Boolean checkDeleted) > at NHibernate.Impl.SessionImpl.ImmediateLoad(Type clazz, Object id) > at NHibernate.Proxy.LazyInitializer.Initialize() > at NHibernate.Proxy.LazyInitializer.InitializeWrapExceptions() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |