[This is preliminary documentation and subject to change.]
Gets the default action for concurrency violations.
IPagedCollection.DefaultOwnerModifiedAction
The data of this property may be modified to adjust the error behaviour. But the data is only analyzed if the next error occurs.
The action defines when to throw a PagingException, whether the local cache should be cleared and whether the local modifications should be cleared.
Errors may only occur when items are reloaded. Items are reloaded when the developer is iterating over a paged collection. It is dangerous to clear the local cache for paged sets because they will lose their current position in the list. This means that it is impossible to move to the next persistent item and the iteration stops before all items are iterated.
Even if the local modification will be discarded it will not be possible to store the owner, which is the data object that owns the indexed property represented through this collection, because it is impossible to discard the modification of other owner-properties. Therefore the timestamp of the owner is not be adjusted, and storing the owner will result in a PersistenceException.
See the OwnerModifiedAction class for further information.
Note that it is possible to overwrite the default action by registering to the OwnerModified event.
Initial value:
ExAction | ClearCache | DiscardModifications | Description | |
---|---|---|---|---|
PagedSet | NeverThrowException | false |
false |
Reload errors are fully ignored. This means that the developer who iterates over the paged set will not recognise that the owner has been modified. Items in the local cache, which have been removed, will be iterated until they are thrown away because the MaxLoadedItemCount is exceeded. Storing an owner which has been modified by another transaction will result in a PersistenceException. |
PagedSet Class | PmMda.Net.Dog.Paging Namespace