updateSynchronizationVersion Method

Called at the end of a transformation, updates the target scope element to say that transformation up through the source's changeset has been performed. Also stores all changesets that occurred during the transformation as "pending synchronization changeset indices"

updateSynchronizationVersion(__namedParameters: { initializeReverseSyncVersion: undefined | boolean }{}): void

@see TargetScopeProvenanceJsonProps

You generally should not call this function yourself and use process with argsForProcessChanges provided instead. It is public for unsupported use cases of custom synchronization transforms.

@note If argsForProcessChanges is not defined in this transformation, this function will return early without updating the sync version, unless the initializeReverseSyncVersion option is set to true

The initializeReverseSyncVersion is added to set the reverse synchronization version during a forward synchronization. When set to true, it saves the reverse sync version as the current changeset of the targetDb. This is typically used for the first transformation between a master and branch iModel. Setting initializeReverseSyncVersion to true has the effect of making it so any changesets in the branch iModel at the time of the first transformation will be ignored during any future reverse synchronizations from the branch to the master iModel.

Note that typically, the reverseSyncVersion is saved as the last changeset merged from the branch into master. Setting initializeReverseSyncVersion to true during a forward transformation could overwrite this correct reverseSyncVersion and should only be done during the first transformation between a master and branch iModel.

Parameter Type Description
__namedParameters { initializeReverseSyncVersion: undefined | boolean }  

Returns - void

Defined in

Last Updated: 06 November, 2024