company logo

Property :: reset - Reset instance

The function resets the current selection in the property handle, i.e. the selection is canceled without storing last updates (see cancel() ). Since the function resets the current selection, all subordinated property handles will be canceled, too.

After deselecting the selected instance, the function rereads the instance from database in order to get the current state of the instance. Subordinated property handles remain unselected.

When the property handle is invalid, the function throws an exception. When the instance could not be reread (e.g. because it had been deleted by another user), the property handle is deselected.

When a filter has been set for the property handle, the updated instance state might not match the filter condition anymore, which also will cause to deselect the instance.

Notes:

The instance is re-read by identity. Than the key is extracted from the instance to check, whether the instance is still member of the collection. If the key is not found in the index the function tries to locate the instance in the index by identity. This might take a little while, but in the other case generic instances will cause problems when the generic type in the instance differs from the generic type of the index.

Implementation details

Property  :: reset (  )