This topic is intended for administrators and developers with administration access rights in Episerver.
You can create a many-to-many (N:N) relationship with business objects. For example, a many-to-many relationship helps to track many SKUs and their inventory levels with many warehouse locations, or multiple contacts a part of multiple organizations. A many-to-many relationship between two objects also is called a bridge.
In the example both Organization and Organization_Contact = N.
- To create a many-to-many relationship, select a business object and then click the N:N Relations tab.
- Click New Relation "many to many" to create a new N:N relationship.
- Fill in the Relation N:N dialog box.—Image: Relation N:N properties—
- Current Object. Defaults to the name of the Business Object you are editing.
- Related Object. Select an object from the drop-down menu.
- Relation Name. Automatically populated byCurrent Object Name_Related Object Name. You can change it, but it must be unique and you can use only letters, numbers, and underscores (_); no spaces or special characters.
- Friendly Name. Enter a unique name (special characters and spaces are permitted).
- Display Region. Select a region where the field appears for theCurrent Object (SKU) and the Related Object (SKU_Warehouse) from the drop-down menu.
- Display Text. Enter the text associated with the objects.
- Display Order. Enter the number associated with the objects.
- Click Save.
A many-to-many relationship is automatically generated for the related object when you click its N:N tab on its configuration form.