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.