Whe i try delete a object, produced a error in :
Private Sub deletePrivateObject
..
..
If m_useCache Then
m_cache.Remove(obj) 'remove from the cache
End If
I comment this code and this is correct.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.
I understant that, what if i comment, the object is in the cache, but if i don't comment, it is produce a mistake:
Excepcin no controlada del tipo 'AToMSFramework.DeleteException' en microsoft.visualbasic.dll
Informacin adicional: Referencia a objeto no establecida como instancia de un objeto.
In this code is produced a mistake( Class:CCacheEntry ///// Public Overloads Sub Remove(ByVal obj As CPersistentObject)
):
If obj.getClassMap.RelationalDatabase.getConnection(Nothing).Started Then
ce = MyBase.Item(ckey)
ce.TransactionType = CCacheEntry.CacheTransaction.Deleted
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If obj.getClassMap.RelationalDatabase.getConnection(Nothing).Started Then
ce = MyBase.Item(ckey)
If Not (ce Is Nothing) Then
ce.TransactionType = CCacheEntry.CacheTransaction.Deleted
End If
Else
MyBase.Remove(ckey)
End If
I'll update CVS.
Thanks,
Richard.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have the last CVS of delete cache.
Whe i try delete a object, produced a error in :
Private Sub deletePrivateObject
..
..
If m_useCache Then
m_cache.Remove(obj) 'remove from the cache
End If
I comment this code and this is correct.
Hi Victor,
I've done testing on the delete locally and can't get it to fail. Can you let me know what the error message is that you are getting.
The delete call shouldn't be commented otherwise the cache may return the deleted object during retrieve operations.
- Richard.
Hi.
I understant that, what if i comment, the object is in the cache, but if i don't comment, it is produce a mistake:
Excepcin no controlada del tipo 'AToMSFramework.DeleteException' en microsoft.visualbasic.dll
Informacin adicional: Referencia a objeto no establecida como instancia de un objeto.
In this code is produced a mistake( Class:CCacheEntry ///// Public Overloads Sub Remove(ByVal obj As CPersistentObject)
):
If obj.getClassMap.RelationalDatabase.getConnection(Nothing).Started Then
ce = MyBase.Item(ckey)
ce.TransactionType = CCacheEntry.CacheTransaction.Deleted
What happen if the object isn't in the cache ???
Argh! You're right and I'm blind :-)
Simple change:
If obj.getClassMap.RelationalDatabase.getConnection(Nothing).Started Then
ce = MyBase.Item(ckey)
If Not (ce Is Nothing) Then
ce.TransactionType = CCacheEntry.CacheTransaction.Deleted
End If
Else
MyBase.Remove(ckey)
End If
I'll update CVS.
Thanks,
Richard.
All right.
Excellent work. I am going to continue trying your code.