Creating Object Versions
Whenever you want to continue modifying an object without overwriting the nonannotational property values and origin collections of the existing object versions, you create a new version of the object. When you create a new object version, you must use an existing, frozen version of the object as the creation version of the to-be-created version. To create the new version, you invoke the CreateVersion method with an IRepositoryObjectVersion interface pointer to the creation version. The repository engine creates a new, unfrozen version of the object. The new version has property values identical to those of the creation version. The collections of the new version are based on the creation version's collections, as follows:
- The repository engine copies each origin collection whose type has the COLLECTION_NEWORGVERSIONSPARTICIPATE flag set. If this flag is not set, the origin collection is not copied.
- By default, the repository engine does not copy the creation version's destination collections into the newly created version. Your application might, however, include custom behavior for the CreateVersion method that does copy some or all destination collections.
When you create a new version of an object, the repository engine modifies the version graph accordingly.