Add Related Entity
The Add Related Entities feature enables the extension of a query by joining the main entity with other related entities. This functionality is useful for querying multiple entities having established relationships, similar to SQL JOIN operations.
Steps to Add Related Entities
Initiate the Process
In the Main Entity Component, click the Add Related Entity icon.
A new section will appear below the main entity, allowing the selection of a related entity with an established relationship to the main entity.
Choose a Related Entity
A dropdown will list all entities related to the main entity.
Select the desired related entity to join. This entity will be added to the query.
Define the Join Conditions (Optional)
Click on the join condition to open the configuration.
Select a different field or adjust the join type (e.g., INNER JOIN, LEFT JOIN).
Add Conditions or Groups to the Related Entity (Optional)
After adding the related entity, conditions (rows) or groups can be added to filter data from the related entity, just as for the main entity.
Add Multiple Related Entities (Optional)
More than one related entity can be added to the query by repeating the process. Each related entity can be joined with either the main entity or another related entity, allowing for complex multi-entity queries.
Example:
Suppose the Employee entity is in use, and there is a need to include information from the Department and Project entities:
Click Add Related Entity and select Department to join the Department entity with the Employee entity.
Add conditions to filter departments based on their type, such as "IT" or "HR."
Click Add Related Entity again and select Projects to join the Projects entity with the Employee entity.
Add conditions to filter the projects based on their status or priority.
This approach facilitates querying employees alongside their associated departments and projects, providing deeper insights across related data.
Last updated