Description
The purpose of this method is similar to the object ID reference translations done at the end of deep cloning. References between objects in the workset have their object IDs translated to the swapped object IDs of the referenced objects. Unlike cloning, this translation must happen in both directions. Thus, it is possible to see two different ID maps passed in on different calls to this method.
For example, an original object swapped with a new one will get a mapping of all other original objects swapped with their new ones. Because the long transaction manager is about to erase these original objects, it is important that their inter-object relationships be correct for purposes such as sending erase notifications.
A new object may or may not have an original with which to swap. In either case, its references must be updated using a mapping from all the other new objects to their originals.
The default behavior of this method in DBObject is to translate object ID references on the object using idMap, in the same way that translation is done for a DeepClone() operation.
Warning
Custom objects that override this method must super-message their parent. Failure to super-message will cause the process to abort at runtime.
Visual Basic
Public virtual Function SwapReferences( idMap As IdMapping ) As void
C#
public virtual void SwapReferences( IdMapping idMap );
Parameters
Parameters | Description |
---|---|
IdMapping idMap | Input refedit ID map |