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.

Creating 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 Types folder to view the entity types.

  4. Expand the entity types to view the Navigation Properties folder .

  5. Double click the Navigation Properties folder to open it in the mass edit view.

  6. Choose Display->Change Display-->Changebutton to switch to edit mode.

  7. Choose the Append Row Appendto 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

    You have to add one mapping for each Key Property of the Principle Entity Type.

    Note

    To create Referential Constraint, both the Principle and Dependent Property fields are mandatory.

    Note

    In the mass edit view, you can display the details of the association at any time by selecting the relevant row and choosing Details Details. A popup is displayed, which lists the group descriptions and corresponding cell content. The information displayed in this popup is read-only.

  9. Save the changes.

More Information

See Associations for more information on additional functions.