Show TOC

Referential ConstraintsLocate this document in the navigation structure

Introduction
A referential Constraint can be used to specify the foreign key relationship for 1:1 or 1:n associations. Follow below procedure to create Referential Constraints.
Procedure
To create Referential Constraints proceed as follows:
  1. Open the Service Builder.
  2. Expand the Data Model folder in the tree view of your project.
  3. Expand the Entity TypesStart of the navigation path Associations End of the navigation path.
  4. Expand the associations created.
  5. Double click on Referential Constraints to open it in the mass edit view.
  6. Click Display-->Change (Display-->Change) to switch to edit mode.
  7. Click Append Row (Append Row) to create a new association. A row is now added.
  8. Do the following in the mass edit view:

    Fields

    Description

    Principle Entity

    Enter the name of the Principal Entity for which the association has to be created.

    Principle Key

    Enter a Key Property of the principle Entity Type. Use the input help to select an existing property.

    Dependent Entity

    Enter the name of the Dependent Entity for which the association has to be created.

    Dependent Property

    Enter the Property of the dependent Entity Type which correlates to the entered Key property of the principle Type. Use the input help to select an existing property.

    Note
    1. You should map all the key properties of the Principle Entity Type to Dependent Properties.
    2. To create Referential Constraint, both the Principle and Dependent Property fields are mandatory.
  9. Save the changes.
More Information

See Associations for more information on additional functions.