Validate_Save_Structure_Mode - DataDictionary

Determines what type of DataDictionary object structure validation will occur before a save operation

Type: Property

Access: Read/Write

Data Type: Integer

Parameters: None

Syntax
 Property Integer Validate_Save_Structure_Mode

Read Access: Get Validate_Save_Structure_Mode to IntegerVariable
Write Access: Set Validate_Save_Structure_Mode to IntegerVariable/Value


Description

When a Save or a Delete request is made to a Data Dictionary, it will validate its object structure and make sure that all of the required parent and child DDOs are present and properly connected. Depending on the type of operation, save, delete with no cascade, or delete with cascade different types of validations are performed. If the current DDO structure is not complete for the specified operation, an error will be raised and the operation will not occur.

Verifying an entire DDO structure for a particular operation can be a complicated process. As long as you provide each Data Dictionary class with an accurate list of required parent and child tables this complicated process will be handled for you automatically.

Validation Mode


Set Validate_Save_Structure_Mode   to DD_VALIDATE_STRUCTURE_ONCE
Set Validate_Delete_Structure_Mode to DD_VALIDATE_STRUCTURE_ONCE


Properties are provided that allow you to modify how Save and Delete structure validation is handled. Since DDO structures tend to be static within an application you normally you only need to validate a save and delete structure one time, which will be the first time you try to save or delete within a DDO. This is the default.

If you are creating DDOs that change dynamically, you may need perform this validation before every save and delete. While this is unlikely, it is supported.

Finally, you may choose to turn this validation off completely. This should be done with caution.

Below is a summary of the validation modes:

ConstantMeaning
DD_VALIDATE_STRUCTURE_ALWAYS (0)The Data Dictionary will check the table structures every time a record is saved / deleted.
DD_VALIDATE_STRUCTURE_NEVER (1)Data Dictionary parent-tables-structure checking is disabled.
DD_VALIDATE_STRUCTURE_ONCE (2)The default. The Data Dictionary will check the table structures once when the first record is saved after loading the view. This assumes that the structure will not change during the session - normally a safe assumption.

See Also

Defining Data Dictionary Parent, Child and External Relationships