
A referential Constraint can be used to specify the foreign key relationship for 1:1 or 1:n associations.
To create Referential Constraints proceed as follows:
Open the Service Builder.
Expand the Data Model folder in the tree view of your project.
Expand the Entity Types folder to view the entity types.
Expand the entity types to view the Navigation Properties folder .
Double click the Navigation Properties folder to open it in the mass edit view.
Choose
Display->Change
button to switch to edit mode.
Choose the
Append Row
to create a new association.
A row is now added.
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. |
You have to add one mapping for each Key Property of the Principle Entity Type.
To create Referential Constraint, both the Principle and Dependent Property fields are mandatory.
In the mass edit view, you can display the details of the association at any time by selecting the relevant row and choosing Details
. A popup is displayed,
which lists the group descriptions and corresponding cell content. The information displayed in this popup is read-only.
Save the changes.
See Associations for more information on additional functions.