IMetabaseUpdateDataObjectNode.ReferenceConstraintsHandling

Syntax

ReferenceConstraintsHandling: UpdateDataConstraintsHandlingType;

Description

The ReferenceConstraintsHandling property determines a method for handling integrity constraint of updated object elements.

Comments

This property is relevant for the update of MDM dictionaries, which elements may have the links from other dictionaries.

Example

Executing the example requires an MDM repository with the NSI_1 identifier. The current repository contains the Dict_1 MDM dictionary.

Sub Main;

Var

MB: IMetabase;

MBDesc: IMetabaseObjectDescriptor;

MUpdate: IMetabaseUpdate;

ObjNode: IMetabaseUpdateDataObjectNode;

Begin

MB := MetabaseClass.Active;

//Updated dictionary

MBDesc := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key);

MUpdate := MB.CreateUpdate;

ObjNode := MUpdate.RootFolder.Add(MetabaseUpdateNodeType.DataObject) As IMetabaseUpdateDataObjectNode;

ObjNode.Label := MBDesc.Id;

ObjNode.Method := MetabaseUpdateMethod.All;

ObjNode.Object := MBDesc;

ObjNode.ReferenceConstraintsHandling := UpdateDataConstraintsHandlingType.Ask;

MUpdate.SaveToFileNF("c:\NSIDictionary.pefx");

End Sub Main;

After executing the example a new update is created. The MDM dictionary Dict_1 is included in this update. In case there are links from others dictionaries to the destination dictionary elements that are absent in the update, when the dictionary elements are updated the dialog box with the selection of further operations opens.

See also:

IMetabaseUpdateDataObjectNode