Previous Topic: Data Partitions Setup

Next Topic: Constraint Types

Constraint Specifications

You specify constraints and validation tests in Majic using the object definition metalanguage.

Note: For information, see the Technical Reference Guide.

Constraints defined in Majic closely resemble an SQL WHERE clause, with the following exceptions:

The following table contains examples of valid constraints to use for the Change_Request table, used to store change order information:

Constraint Type

Code and Description

View

assignee.organization = @root.organization

Specifies the user can only view change orders where the assignee’s organization is the same as the user’s organization.

Pre-Update

requestor = @root.id

Specifies the user can only update the change orders where he is the caller or requester.

However, you cannot write a constraint that uses joins on both sides of the expression, as shown in the following example:

assignee.org = requestor.org