INHibernateProxy p = owner as INHibernateProxy
Then take a look ILazyInitializer

2008/11/22 epitka <[EMAIL PROTECTED]>

>
> ... proxied class. I am running in situation that I need to get
> reference to instance of a proxy when I have reference to a proxied
> object. I am adding a LoadCollection listener, and collection.Owner is
> a proxied class and instance of owner is proxy, so when I do
> bidirectional relationship synchronization this might fail
>
> Assert.IsTrue(ReferenceEquals(invoice, invoice.lineItems[1].invoice)
>
> because the "invoice" is a proxy and invoice.lineItems[1].invoice is
> the instance of the collection.Owner. Since I have real class I wonder
> if I could look up somehow what is the proxy instance for it.
>
>
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
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