-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Bug in OuterJoinLoader.WalkAssociationTree
PostPosted: Tue Mar 28, 2006 1:05 pm 
Regular
Regular

Joined: Mon Mar 20, 2006 10:49 pm
Posts: 59
I built NHibernate using .NET 2.0 and ran the test suite. All tests performed as they did using .NET 1.1 except FooBarTest.FindByCriteria, which failed using .NET 2.0. After extensive exploration, we believe we have isolated the cause of the discrepancy. In OuterJoinLoader.WalkAssociationTree, Line 588, the line

Code:
visitedPersisters.Add( persister );


should be

Code:
visitedPersisters.Add( joinable );


The problem is exposed because the persister order is different between .NET 1.1 and 2.0. Under .NET 1.1, the three relevant calls to WalkAssociationTree have persister=Foo, joinable=Foo and persister=Foo, joinable=Fee and persister=Fee, joinable=Fee. Under .NET 2.0, there are only two calls: persister=Foo, joinable=Fee and persister=Foo, joinable=Foo.

The correct behavior is two calls, so .NET 1.1 is behaving incorrectly, even though the test passes. Under .NET 2.0, the first call creates the Fee association, but incorrectly adds Foo to visitedPersisters, thus preventing the Foo association from being created by the second call.

_________________
Mike Abraham


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.