Viewing, Creating, and Editing Business Object Relationships

In the Data Designer, the Relationships area of the Overview tab for a business object displays the relationships between that business object and other business objects in your application.

When you create a reference to another business object or when you create a lookup data object, the relationship between the current business object and the one being referenced or looked up is, by default, many-to-one. For example, when you create a reference from an Employee business object to a Department business object, an Employee can belong to only one Department, but a Department normally has many employees. Similarly, when you create a Locations business object as a lookup value for a Department, a Department can have only one Location, but a Location can have multiple departments.
Description of data-designer-objects-relships.png follows
Description of the illustration data-designer-objects-relships.png

You can delete a relationship, but only if it is not used anywhere in your application.

To create a new relationship:

  1. Click Data Designer in the main menu and open Business Objects.
  2. Select the database you want to view in the dropdown list.
  3. Select the business object that you want to view.
    The contents of the Overview tab are displayed.
  4. Click the Add icon next to Relationships.
  5. In the dialog box, select the business object you want to create a relationship with.
  6. Select the cardinality for each object (Many or One).
    You can click the Reverse Relationship button to switch between one-to-many and many-to-one. You can specify cardinalities of one-to-one and many-to-many between business objects, in addition to many-to-one and one-to-many. If you specify Many-to-Many, an intersection business object with two reference fields is automatically created. Its name is a concatenation of the two business objects. For an intersection business object, you can't deselect the Required check box in either of the reference fields, and the default delete rule is Cascade.
  7. Edit the properties of the relationship field (the Label, the Default Display Field, the Required check box, the Delete Rule). For the Delete Rule, the available choices are Cascade, Restrict, and Set To Null. Whether you can edit a property and what values are available depends on the nature of the relationship and the objects.
    Description of data-designer-objects-relships-mtom.png follows
    Description of the illustration data-designer-objects-relships-mtom.png
  8. Click Create.
  9. Click Save to save the new relationship.
The new relationship is displayed in the Relationships list. If you specified many-to-many as the cardinality, the new intersection business object is also displayed.

To edit a relationship, click the Edit icon next to the relationship name and make the changes you want to. Some fields cannot be edited and are disabled. You can specify the Label and select the Default Display Field. You may be able to select the Required check box for the field, and you can specify a Delete Rule. The default Delete Rule is Restrict, but you may be able to select Cascade or Set To Null.