After you have seen this HowTo video and read this article you will know how model relations are created and how you can connect certain data to other data in your application.
- Click on 'datamodel' in the Builder Menu left.
- Hover at the model which you would like to connect with another model.
- Click on the '+' in the header. Drag and drop the line to the other model.
- The model relation settings appears. Select between the three types of model relations: Has_many, Belongs_to, and Has and Belongs to many.
- Click 'Save' and the selected relation is created.
- Notice that every model relation is shown in both models. Example: if you've created a relation that One Customer holds multiple Invoices, you will now see Customer in the Invoice model and Invoices in the Customer model.
- Notice that relations also could be created via the model settings. Click on a model and the model settings apears. Clikc on the subview 'Relations' and click 'New'. Select the relation type and which model you would like to connect with the one you have selected previously. Click 'Save' and the relation is created.