Versions and transactions
Usually, versions are created when storing a transaction. The way, version numbers for storing instances are obtained depends on versioning mode.
Within a transaction only one new version may be created for each versioning scope. Creating several new versions for the same versioning scope within a transaction will result in only one new version for the versioning scope.
Versions are created for database entries, when storing the topmost transaction to the database. Since the way organizing transactions depends on the application, short transactions may be used as well as long or very long (workspace) transactions. All instances updated in a transaction are locked for other transactions. In order to reduce the number of locking conflicts, only database entries that have been updated are included into the transaction, i.e. no explicit checkout is required, but database entries are checked out on demand.
For individual versioning, the current version number is managed by the owner scope, i.e. the current version is the version of the global instance or root extent main index (scope owner).
Synchronized and consistent refer to the database version, which will be increased when creating a new version, i.e. in order to create new owner scope version for one or more owner scopes, one has to create a new database version. Within a transaction, only one new database version may be created also when calling the function several times.
For synchronized version, owner scopes create new versions when this has been explicitly requested ( Property ::updateInstanceVersion() , Property ::updatePropertyVersion() ). Consistent versioning automatically assigns the current database version to all instances stored in the transaction, i.e. all database entries with older versions will create new database entry versions.
Using managed versioning assigns the current major version of the database to all instances stored in the transaction, i.e. all database entries with older versions will create new database entry versions.