Deferred Constraints

Previous Next

See Also

Deferred constraints are constraints for which the Deferred property (the Deferred field of the Constraints window) has been set to Commit or Post Commit. Deferred constraints are not evaluated until commit, or until post commit. Constraints may only be deferred if they comply with the following requirements:

· The constraint must be corrective.

 

· The constraint must be non-transitional.

 

· Non-restrictive, non-transitional invocative constraints (containing INVOKE statements) can also be deferred. These can be either:
· Corrective invocative constraints that use: XML.IMPORT.

or

· Invocative constraints that do not return a record or output. This is the case if the associated method does not have any output or return parameters, or it is a query protocol without a fetch method.

You should defer a corrective multi-record constraint if you know that the correction need not be executed for each manipulated record. This way you will improve application performance.

For example, suppose you have a complicated price calculation constraint involving many tables. By deferring this constraint until commit, you can avoid unnecessary price re-calculation on every manipulation on any of the tables mentioned in the constraint.

Related Topics

When to Defer Constraints until Commit

When to Defer Constraints until Post Commit

Constraints Deferred to Post Commit: Error Handling