It looks like it does! My apologies for not searching jira thoroughly enough, and thank you for bringing this to my attention. It looks like the fix for this is not slated for release until the next GA release, but that is not such a big deal for us. We should be fine to merge the fix into the latest GA branch and compile it ourselves.
thanks again. This saved me a lot of debugging hours :) nick On Friday, June 14, 2013 4:30:04 AM UTC-4, Oskar Berggren wrote: > > I'm relying on a proxy being equal to itself and have not had any problems. > > But there is this issue... does it apply to you? > https://nhibernate.jira.com/browse/NH-3070 > > /Oskar > > > > 2013/6/14 <[email protected] <javascript:>> > >> We are upgrading an application that was using 3.0.0 with the Castle byte >> code provider to 3.3.3, and are having some difficulty with the proxy >> implementation of Equals in the new built-in LinFu.DynamicProxy >> implementation. For years we have been getting by without implementing >> equals/gethashcode, and rely on reference equality for all comparisons. >> After upgrading, to 3.3.3 proxies seem to no longer respect reference >> equality. See below, which is actual output from a debugging session where >> I was looking at interceptions for Equals() calls that were made while >> attempting to remove an entity from >> a NHibernate.Collection.Generic.PersistentGenericBag: >> >> proxy.GetType().GetMethod("Equals").DeclaringType.FullName >> "ActivityProxy" >> >> proxy.GetType().BaseType.FullName >> "Domain.Model.Activity" >> >> >> >> proxy.GetType().BaseType.GetMethod("Equals").DeclaringType.FullName >> "System.Object" >> >> System.Object.ReferenceEquals(proxy, args[0]) >> true >> >> proxy.Equals(args[0]) >> false >> >> >> args[0].Equals(proxy) >> false >> >> >> I don't understand how an instance of a proxy is not equal to itself when >> the underlying type has not overridden Equals or GetHashCode... Does >> NHibernate now require that you implement your own equality operator?? >> Mostly I'd like to know if this is a bug or expected behavior. >> >> Thanks in advance, >> nick >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/nhusers. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/groups/opt_out.
