RepositoryObjectVersion MergeVersion Method

See Also

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; the object version whose value 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.

Remarks

Relationships are inserted at the end of the sequenced collection.

The two object versions must be versions of the same object.

The current object version must be unfrozen. The other object version must be frozen.

MergeVersion compares the property values and collections of each object version to a third version, called the Basis Version.

The Repository considers one of the two to-be-merged object versions to be the primary version, and the other to be the secondary version, according to the value of flags you supply. During the merge, the Repository engine considers each property and origin collection type in turn. For each property, MergeVersion uses this rule:

For each origin collection type whose COLLECTION_MERGEWHOLE flag is set, MergeVersion uses this rule:

For each origin collection type whose COLLECTION_MERGEWHOLE flag is not set, MergeVersion combines the items in the two collections as follows:

Note that the resulting collection can exclude some items found in the basis object version's collection. For example, if the primary version's collection excludes the item, the resulting collection will exclude the item. Similarly, if the primary version's collection includes an item that is identical to an item in the basis version's collection, but the secondary object version excludes the item, the resulting collection will exclude the item.

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.