IRepositoryObjectVersion::MergeVersion

See Also

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.

HRESULT MergeVersion(
IRepositoryObjectVersion *pOtherVersion
long fFlags
);

Parameters

*pOtherVersion

[in]
The IRepositoryObjectVersion interface pointer for the predecessor of the merge — the object version whose property values and collections should be merged into the current version.

fFlags

[in]
Indicates which object version is the primary and which is secondary in the merge.

Return Value

S_OK

The method completed successfully.

Error

Values

This method failed to complete successfully.

Remarks

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 fFlags you supply. During the merge, the Repository 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: