company logo

Access data versions

Ba default, database entries are access for the current version, which is the highest version stored for the database entry. One may, however, change the access version on object space or property level.

When running a database with synchronized, database, objectspace or pure managed versioning mode, one may set an access version on object space level in order to access all database entries for a specific version number (or older) by calling ObjectSpace::setAccessVersion(). After setting an object space version, required versions for all opened property handles are set to the last object space version. When accessing instances for an older version, instances are write protected. The object space access version may be overwritten by version numbers set on property level.

When an instance selected in a property handle inherits from

In order to access different owner scope versions, one may call Property::setAccessVersion() for any property handle. The function will set the requested version recursively for all subordinated property handles (instances and collections) . When a global instance (scope owner or instance) inherits from system type __OBJECT, one may also call Property::setAccessVersion() passing a timestamp for selecting an instance version. This is not completely correct, since the time stamp only provides information about the starting version, in which the modification took place and not about begin and end of the version interval. Anyhow, it is a good estimation in some cases.

When selecting a new instance in the scope owner property handle, requested versions for all subordinated property handles are reset to the requested instance version of the parent property handle.

In order to change to previous or next version one may call Property::nextVersion(), or Property::previousVersion(). These functions may be called for the global instance owner but also for subordinated instances.