Creating a Self Association

This section will guide you to create self associations in the entities.

Context

To create a self single/bidirectional association proceed as follows:

Procedure

  1. Create an entity type as mentioned in the Creating an Entity Type section.
  2. Select Single to create a single self association and select Bidirectional to create a bidirectional self association.

    Note An example for single self association is the association between a Manager and his direct reports. An example for birectional self association is the association between the Employees and Manager as well as Employees and DirectReports.
  3. Double click (click in the entity type shape and drag the mouse inside the entity type. Then click again inside the entity type shape) in the entity type shape to create a single/bidrectional self association.
    The self association is created and a dotted arrow line appears.

  4. Choose the Select Icon in the Palette to come out of the association create mode.
    • Press escape from the keyboard to come out of the association create mode.

    Note A Navigation Property is automatically created for the new association. You can rename the navigation property by double clicking on it. Every navigation propery should have a unique name.
  5. Select the association in the graphical editor.
    The properties of the association are displayed in the Properties view.

  6. Click in the Value column for the Multiplicity to edit the multiplicity.
  7. Select a multiplicity and the OData Model Element displays the changes.

    The value for the Role of the association can also be edited in the Properties view.