AcceptChanges method of BusinessListBase doesn't remove deleted objects from DeletedList collection. The following fragment of AcceptCahnges checks EditLevelAdded proprety before deleting an object from collection. Objects loaded from DB never get deleted. They just sit in DeletedList collection until end of BusinessListBase lifespan.
for (int index = DeletedList.Count - 1; index >= 0; index--){
C child = DeletedList[index];
child.AcceptChanges();
// if item is below its point of addition, remove if (child.EditLevelAdded > _editLevel)DeletedList.RemoveAt(index);
}
I think check should be if (child.EditLevelAdded >= _editLevel).
Is this is a bug or am I doing anything wrong?
At what time are "old" but deleted items removed from DeletedList collection? Only 2 methods remove object from DeletedList : UndoChanges and AcceptChanges. Both of them however perform check
if (child.EditLevelAdded > _editLevel)
I don't see DeletedList collection being cleared either.
At what time are "old" but deleted items removed from DeletedList collection?
Thanks,
Oleg Shokodko
Copyright (c) Marimer LLC