I'd think that ReferenceEquels is not appropriate here. 'equality' in terms of persisted objects, is either through the PK (for entities) or the combination of all properties (for Value Objects). It's perfectly allright imo for a DAL of any kind to represent the exact same DB row in two actual in-memory objects.
On Sat, Nov 22, 2008 at 6:13 PM, epitka <[EMAIL PROTECTED]> wrote: > > ... 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. > > > > > -- Ken Egozi. http://www.kenegozi.com/blog http://www.delver.com http://www.musicglue.com http://www.castleproject.org http://www.gotfriends.co.il --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
