Relations
Last updated
Last updated
An Entity can be linked to other entities. This association is termed a Relation.
Relations can be set up between two (2) or more Entities.
Relations use the current entity's primary keys only.
A relation may be any of the following types:
One-to-One (1-to-1): One Parent Entity record can be related to One Child Entity record.
One-to-Many (1-to-M): One Parent Entity record can reference multiple child records in Child Entity.
To define a relation, click on the Relations tab of the Entity to be selected as Parent Entity.
Define the following fields:
Relation Name: The name of the relation. It should be unique and meaningful.
Type of Relation: Select relation as One-to-One or One-to-Many.
Related Entity: Select Child Entity.
Parent Entity Field: This field links the Parent Entity to the Child Entity. By default, the primary key of the Parent Entity is selected and cannot be edited.
Related Entity Field: Specify the fields to reference the Child Entity records as this field holds the exact value of the parent entity record primary key.
Cascade Delete: Checking this field defines that if a record in the parent Entity is deleted, then the related records in the child Entity will automatically be deleted. This ensures that no orphan records will remain on the deletion of the Parent record.