RepositoryObjectVersion MergeVersion Method
This method changes the current object version by combining its property values and origin collections with the property values and origin collections of another version of the same object.
Syntax
Call object.MergeVersion(otherVersion , flags)
The MergeVersion method syntax has the following parts.
Part | Description |
---|---|
object | An object expression that evaluates to a RepositoryObjectVersion object. |
otherVersion | An object expression that evaluates to a RepositoryObjectVersion object. It is the object version that has values that you want to merge into the current object version. |
flags | A flag indicating which version (the current version or the other version) the repository should use as the primary version of the merge operation.
Primary=1 indicates that the predecessor object is primary and the current object is secondary. Secondary=2 indicates that the predecessor object is secondary and the current object is primary. |
Remarks
Merging two object versions requires that the current object version is unfrozen, and the other object version is frozen. Furthermore, the two object versions must be versions of the same object.
Depending on how you set flags, one object version is the Primary Version and the other object version is the Secondary Version. MergeVersion compares the property values and collections of each object version to a third version, called the Basis Version. During the merge, the repository engine considers each property and origin collection type in turn. Relationships are inserted at the end of the sequenced collection.
Merging object versions is a complex process. For more information about the merge process and how the repository engine selects values, see Merge Overview.