Handling versioning modes
In order to support flexible versioning strategies, ODABA provides different versioning features that may be combined to different versioning strategies. Versioning features and supported combinations are described in "Versioning Modes".
When creating a new database, the versioning mode is undefinedVersioning. Because the versioning mode is defined for a database all object spaces within a database do have the same versioning mode.
In order to set the versioning mode explicitly, one may call Database::versioningMode() or the DBVersion utility. Changing versioning mode later on is limited to downgrade features:
- Versioning consistency: consistent --> synchronized --> independent
- Versioning scope: database --> individual --> local
- Versioning level: managed --> simple
When not yet being defined, the versioning mode is set automatically, when creating the first major or owner scope version. When calling Database::createMajorVersion() for the database, the versioning mode is set to managedDatabase, when not being set so far.
When calling Property::createInstanceVersion() or Property::createPropertyVersion() in order to create a global owner scope version, versioning mode databaseOwner is set for the database.