Adding a Relationship Between the Object Definitions
Delectable Bonsai must relate an application to multiple evaluations. This involves adding a one-to-many relationship in the Distributor Application object.
-
Begin editing the Distributor Application object.
-
Go to the Relationships tab.
-
Click Add () and enter these details:
Field Value Label Application to Evaluations Name applicationToEvaluations
Type One to Many Object Application Evaluation -
Click Save.
This adds a relationship table to Distributor Application, which you can add to a separate tab in the definition’s layout.
The relationship also adds a field to Application Evaluation object definition.
Liferay also adds dedicated relationship REST endpoints to both object definitions for relating and disassociating entries using REST APIs.
Before you practice relating object entries, you must add the relationship to each object’s custom layout.
Next: Adding the Relationship to Custom Layouts