What are you trying to accomplish? (for the app, not "unproxying")
Have you inspected obj.GetType()?

   Diego


On Thu, Jun 10, 2010 at 16:06, [email protected] <
[email protected]> wrote:

> The regular way of unproxying doesn't work since the proxy won't cast
> to INHibernateProxy.  I'm assuming this is a bug (#NH-2148), but I
> just want to make sure that I shouldn't be calling a different cast
> for lazy property proxies.
>
> ie.
> var obj = session.Get<EntityWithLazyProperty>(id);
>
> // it is already a proxy
> var proxy = obj as INHibernateProxy;
> if (proxy != null) // always null at this time
>    obj = proxy.HibernateLazyInitializer.GetImplementation();
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
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