Revision: 4942
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4942&view=rev
Author: ayenderahien
Date: 2010-02-01 20:48:56 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Porting the fix to HHH-2795 from Hibernate
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Engine/Loading/CollectionLoadContext.cs
trunk/nhibernate/src/NHibernate/Engine/Loading/LoadContexts.cs
Modified: trunk/nhibernate/src/NHibernate/Engine/Loading/CollectionLoadContext.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Engine/Loading/CollectionLoadContext.cs 2010-02-01 12:06:34 UTC (rev 4941)
+++ trunk/nhibernate/src/NHibernate/Engine/Loading/CollectionLoadContext.cs 2010-02-01 20:48:56 UTC (rev 4942)
@@ -147,7 +147,7 @@
/// <param name="persister">The persister for which to complete loading. </param>
public void EndLoadingCollections(ICollectionPersister persister)
{
- if (!loadContexts.HasLoadingCollectionEntries || (localLoadingCollectionKeys.Count == 0))
+ if (!loadContexts.HasLoadingCollectionEntries && (localLoadingCollectionKeys.Count == 0))
{
return;
}
Modified: trunk/nhibernate/src/NHibernate/Engine/Loading/LoadContexts.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Engine/Loading/LoadContexts.cs 2010-02-01 12:06:34 UTC (rev 4941)
+++ trunk/nhibernate/src/NHibernate/Engine/Loading/LoadContexts.cs 2010-02-01 20:48:56 UTC (rev 4942)
@@ -102,9 +102,19 @@
/// <returns> True if we currently hold state pertaining to loading collections; false otherwise. </returns>
public bool HasLoadingCollectionEntries
{
- get { return (xrefLoadingCollectionEntries != null && !(xrefLoadingCollectionEntries.Count == 0)); }
+ get { return (collectionLoadContexts != null && collectionLoadContexts.Count != 0); }
}
+ ///<summary>
+ /// Do we currently have any registered internal entries corresponding to loading
+ /// collections?
+ /// True if we currently hold state pertaining to a registered loading collections; false otherwise.
+ /// </summary>
+ public bool HasRegisteredLoadingCollectionEntries
+ {
+ get { return (xrefLoadingCollectionEntries != null && xrefLoadingCollectionEntries.Count != 0); }
+ }
+
/// <summary>
/// Get the {@link CollectionLoadContext} associated with the given
/// {@link ResultSet}, creating one if needed.
@@ -200,7 +210,7 @@
/// </remarks>
internal void UnregisterLoadingCollectionXRef(CollectionKey key)
{
- if (!HasLoadingCollectionEntries)
+ if (!HasRegisteredLoadingCollectionEntries)
{
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|