company logo

Property :: prepareInstanceUpdate - Prepare instance for update

In order to update an instance, it has to be selected in the property handle. When going to update data and the state of the property handle is not quite clear (which usually happens in generic applications), the function prepares an instance in the property handle for update.

First, the function tries to auto-select an instance in the property handle, i.e. it tries to read the instance located in the property handle or to read the only instance, when the property handle refers to a single instance. When no instance is available, the function provides a new (initialized) instance.

The function returns true, when an instance is selected an can be updated and false otherwise. The function throws an exception, when the property handle is not accessible or when a database error had been encountered.

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool Property  :: prepareInstanceUpdate (  )