Constraints

A constraint is a condition used to maintain automatic inverse references when the specified condition is satisfied.

A condition that is used as a constraint cannot have parameters. Only if and return instructions can be used in a constraint condition.

Only automatic references can have a constraint. When the manual side of the inverse reference is set, the condition used as the constraint is evaluated and the automatic inverse is set only if the value of the condition is true. If the automatic reference is a Collection type, the condition is applied to the members of the collection.

For details about defining constraint conditions, see "Adding Conditions to Classes or Primitive Types" under "Defining and Compiling JADE Methods and Conditions", in Chapter 4.