My suggestion... write a concise test case an open a Jira.

   Diego


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

> It is a proxy object "Castle.Proxies.MyObject".  Casting it will not
> produce the proper results.  If I have an interface with methods, a
> null reference is produced cause the proxy doesn't seem to be linking
> these in ONLY when lazy properties are used.
>
>
> On Jun 10, 3:38 pm, Diego Mijelshon <[email protected]> wrote:
> > 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]>
> <nhusers%[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]<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