Versions:IDataObjectVersionCollection
Supplies all versions of a data object.
Versions in onion.net consist of content that was created or changed by a user at some point.
The version number of a version always consists of two numbers, separated by a point. The first number is the major version, which was created in the Productive Environment. The second number is the minor version and is always zero in the Productive Environment. If a data object is edited in a ChangeSet, then it is not the major version that is incremented but the minor version. If the change is published, then the major version is increased by one and the minor version is reset to zero. It is important to note that minor versions, if there are any, are only visible in the respective ChangeSet.
A version is generated whenever a user checks out the data object. For as long as the data object has not been returned however, the current version can be discarded.
The following example should make the way version numbers work clearer.
-
A user creates a data object in the Productive Environment and leaves it checked out. The data object has the version 1.0.
If the user now discards the data object, then it is deleted. If the user returns the data object, the data object will continue to have the version 1.0. The date of the last change is the returning of the data object and the last editor is the user who returned the data object. -
A user checks out the data object just created in the Productive Environment. The data object now has the version 2.0.
If the data object is discarded, then version 1.0 is the current version. If the user returns the data object however, the current version is 2.0. As in point one, the date of the last change is the time of returning and the last editor is the user who returned the data object. - A user checks out the data object again out and makes changes to the content of the data object. A second user assumes the data object later on and returns this data status. The version of the data object is 3.0. The date of the last change is the point at which the second user returned the data object. The last editor of the version is also the second user, since the second user returned the version.
-
A user switches to a ChangeSet and checks out the data object. The current version in the ChangeSet is now version 3.1. In the Productive Environment, the version is still 3.0.
The user returns the data object. The version is still version 3.1. in the ChangeSet. - The user checks out the data object again. The version is now 3.2. After editing the content, the user returns the data object. As in the Productive Environment, the date of the last change is that of the time of returning and the last editor is the user who returned the data object.
- A second user now publishes the ChangeSet. In the Productive Environment, the version of the data object is now 4.0. The date of the last change is the time when the data object was last returned in the ChangeSet. The last editor is also the user who last edited the data object in the ChangeSet. Since these two values are not quite correct when the version is published however, a structural modification is generated at the same time. It is detailed in this structural modification which user published this change and at what time. In addition, the minor versions of the data object are deleted.
- A user switches to a new ChangeSet and edits the content of the data object. In doing so, the version 4.1 is generated. A second user now edits the data object in the Productive Environment and returns it directly. The data object has now the version 5.0 in the Productive Environment and still the version 4.1 in the ChangeSet.
- A user now edits the data object again in the ChangeSet and returns it. The version of the data object in the ChangeSet is 4.2. The major version of the data object remains at version 4 in the ChangeSet, since the content corresponded to version 4 at the time of the first change in the ChangeSet.
- If the ChangeSet is now published, then version 6.0 emerges in the Productive Environment. The changes carried out in version 5.0 are overwritten. If these should have been kept, then the changes carried out in version 5.0 should have also been incorporated in the ChangeSet before publication.
- In a final case, the changes were carried out as in point seven to nine. Now however, the ChangeSet is not published, but the changes to the aspect "content" discarded for the data object. The data object now has the version 5.0, both in the Productive Environment and in the ChangeSet. If the data object is now edited in the ChangeSet, then it is given the version 5.1.
The current version of the Xml that can be called via the methods of IDataObjectContent can also be called in the list of versions.
If IsVersioningDisabled is set to true for the schema, then the list of versions only contains the current version.