I ran into this issue because i was used an abstract base class instead of 
an interface. And after digging into the source, i am wondering if a check 
for abstract classes should not also be made.

/// <summary>
/// If the existing proxy is insufficiently "narrow" (derived), instantiate 
a new proxy
/// and overwrite the registration of the old one. This breaks == and 
occurs only for
/// "class" proxies rather than "interface" proxies. Also init the proxy to 
point to
/// the given target implementation if necessary.
/// </summary>
/// <param name="proxy">The proxy instance to be narrowed. </param>
/// <param name="persister">The persister for the proxied entity. </param>
/// <param name="key">The internal cache key for the proxied entity. 
</param>
/// <param name="obj">(optional) the actual proxied entity instance. 
</param>
/// <returns> An appropriately narrowed instance. </returns>
public object NarrowProxy(INHibernateProxy proxy, IEntityPersister 
persister, EntityKey key, object obj)
{
            bool alreadyNarrow = 
persister.GetConcreteProxyClass(session.EntityMode).IsAssignableFrom(proxy.GetType())
 
*&& !persister.GetConcreteProxyClass(session.EntityMode).IsAbstract*;

what do you think?  
Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/RMCbauPx9gEJ.
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