Skip to content

Commit 71ebf2c

Browse files
author
Mike Doerfler
committed
Added comments about where the problem with a test is occruing and
changed an Add to a [] to mimic the use of Java's put method on HashMaps. SVN: trunk@496
1 parent 0f81591 commit 71ebf2c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/NHibernate/Impl/SessionImpl.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1961,8 +1961,13 @@ private object DoLoadByClass(System.Type clazz, object id, bool checkDeleted, bo
19611961
// retunr new uninitailzed proxy
19621962
if ( persister.HasProxy ) {
19631963
proxy = null; //TODO: Create the proxy
1964+
// this is the spot that is causing the problems with FooBarTest.FetchInitializedCollection
1965+
// when the following code "Assert.IsTrue( baz.fooBag.Count==2 );" is being executed. This
1966+
// is causing a null value to be returned when a "Proxied" version of the class is expected.
1967+
// So the method ThrowObjectNotFound is throwing an exception because it is given a null object
1968+
// - hence the error looks like it can't find a row in the DB.
19641969
}
1965-
proxiesByKey.Add(key, proxy);
1970+
proxiesByKey[key] = proxy;
19661971
return proxy;
19671972
} else {
19681973
// return a newly loaded object

0 commit comments

Comments
 (0)