From: <fab...@us...> - 2011-03-21 18:08:38
|
Revision: 5496 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5496&view=rev Author: fabiomaulo Date: 2011-03-21 18:08:32 +0000 (Mon, 21 Mar 2011) Log Message: ----------- Minor Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Type/EntityType.cs Modified: trunk/nhibernate/src/NHibernate/Type/EntityType.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Type/EntityType.cs 2011-03-21 15:06:30 UTC (rev 5495) +++ trunk/nhibernate/src/NHibernate/Type/EntityType.cs 2011-03-21 18:08:32 UTC (rev 5496) @@ -389,16 +389,17 @@ /// </summary> protected object ResolveIdentifier(object id, ISessionImplementor session) { + string entityName = GetAssociatedEntityName(); bool isProxyUnwrapEnabled = unwrapProxy && session.Factory - .GetEntityPersister(GetAssociatedEntityName()) + .GetEntityPersister(entityName) .IsInstrumented(session.EntityMode); - object proxyOrEntity = session.InternalLoad(GetAssociatedEntityName(), id, eager, IsNullable && !isProxyUnwrapEnabled); + object proxyOrEntity = session.InternalLoad(entityName, id, eager, IsNullable && !isProxyUnwrapEnabled); if (proxyOrEntity.IsProxy()) { - INHibernateProxy proxy = proxyOrEntity as INHibernateProxy; - proxy.HibernateLazyInitializer.Unwrap = isProxyUnwrapEnabled; + INHibernateProxy proxy = (INHibernateProxy) proxyOrEntity; + proxy.HibernateLazyInitializer.Unwrap = isProxyUnwrapEnabled; } return proxyOrEntity; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |