From: Richard B. <rb...@us...> - 2004-11-03 01:31:08
|
Update of /cvsroot/jcframework/dotnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23381 Modified Files: CCacheEntry.vb Log Message: Fixed further issues with cache referencing Index: CCacheEntry.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CCacheEntry.vb,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- CCacheEntry.vb 1 Nov 2004 21:28:02 -0000 1.20 +++ CCacheEntry.vb 3 Nov 2004 01:30:58 -0000 1.21 @@ -877,8 +877,14 @@ Private Function GetCachedObject(ByVal ce As CCacheEntry) As IPersistableObject If m_objectsLoading Then - Debug.WriteLine(" - returning original object " & ce.PersistentObject.GetObjectType.Name) - Return ce.OriginalObject + 'If the object is already fully loaded and is persistent then I can return a copy instead of the original + If ce.PersistentObject.AssociationsLoaded And ce.PersistentObject.Persistent Then + Debug.WriteLine(" - returning copy of object " & ce.PersistentObject.GetObjectType.Name) + Return ce.PersistentObject.Copy + Else + Debug.WriteLine(" - returning original object " & ce.PersistentObject.GetObjectType.Name) + Return ce.OriginalObject + End If Else Debug.WriteLine(" - returning copy of object " & ce.PersistentObject.GetObjectType.Name) Return ce.PersistentObject.Copy @@ -901,7 +907,7 @@ pObj = ce.PersistentObject ck = x.Key outString &= i.ToString & ">" & ce.ToString & vbCrLf & _ - i.ToString & " (Cache Key)>" & ck.ToString & vbCrLf + i.ToString & " (Cache Key)>" & ck.ToString & vbCrLf i += 1 Next x outString &= ">>>> END CACHE DUMP <<<<" |