which is the implementation of the gethashcode ? 2009/6/3 Lee Henson <[email protected]>
> > I have a test case that contains the following scenario: > > Parent has a custom generic set of Child which is empty > Parent has an association to a MedicalRecord > Doctor has an association to the same MedicalRecord > MedicalRecord has an set of Disease which is empty > > In a new session: > > I load the Doctor, which has the side-effect of creating a proxy of > MedicalRecord > I call a method on my Parent.Child custom collection which adds a > Child item > I save the Parent > > Within the flush machinery, my Child gets placed in a Hashtable > (PersistentSet.GetSnapshot()) which causes an evaluation of GetHashCode > (). Since my Child.GetHashCode has a dependency on the > Parent.GetHashCode it calls that too, and that in turn calls > MedicalRecord.GetHashCode. At this point, because MedicalRecord > already exists in the session as a proxy, it attempts to initialize > the proxy. This causes the Diseases collection to be added to the > session, and before you know it: > > AssertionFailure - collection was not processed by flush > > It might be a bit of a contrived example, but in my real model which > is a tad more complicated I am seeing this error. Rather than paste > all the code in this message, you can view the test case files/ > mappings here: > > > http://github.com/leemhenson/nhibernate/commit/4728a32efa48dc836441d3bf63f3c7f6028a54f5 > > There are a couple of other jira issues logged in this area for java's > hibernate: > > > http://opensource.atlassian.com/projects/hibernate/browse/HHH-2763;jsessionid=4FDB651CF40E6BF56843311DF7D0A8F6 > > http://opensource.atlassian.com/projects/hibernate/browse/HHH-3225;jsessionid=4FDB651CF40E6BF56843311DF7D0A8F6 > http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-178 > > Thoughts? > > Cheers > Lee > > > -- 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 -~----------~----~----~----~------~----~------~--~---
