How to make relations between entities

This tutorial shows you how to make relations between entities. In our example we will add 3 attributes in entity and which will represent relations with other entities. We have already defined entity Supplier, if you dont know how to define entity check out this tutorial.

1. Login into developer panel.

2. Navigate to Entities menu item.

3. Select entity Supplier.

4. Select entity attribute Country.

5. In section ATTRIBUTE PROPERTIES for Type select Selection (one selection). This relation means that we may select 1 Country for each Supplier.

6. If entity Country  is already defined select Country from Entity selection. In our example we have to define entity Country, so click on button New.

Attribute selection

7. Enter new entity name and click on Save button. Now we added new entity Country, and we have to define attributes of this entity.

Attribute selection new entity

8. Create new entity attribute called Product category. For attribute Type select Selection (multiselection).

9. Select entity Product category from Entity selection. This relation means that we may select 1 or more Product categories for each Supplier.

Attribute multiselect

10. Create new entity attribute called Products. For attribute Type select Object collection.

11. Select entity Product from Entity selection. This relation means that each Supplier may have collection of Product entity.

Attribute object collection

12. Click on Save changes button.