Add a relation
You can add a relation member to an entity definition to link it to another entity.
To configure a relation member:
- On the menu bar, click Manage.
- On the Manage page, click Schema.
- Search and click the entity definition you want to configure.
- On the left panel, select the member group you want to add the relation member to.
- Click New member.
- In the RELATION section, click Select.
- On the New member dialog box, set the parameters in the tabs General information, Conditional, Required, and Advanced.
- Click Save.
The following sections provide details on the available configuration parameters.
General information
The following table describes the general information parameters of the relation member:
Field | Type | Description | Value | Mandatory |
---|---|---|---|---|
Name | String | Name of the member. | Plaintext value | Yes |
Role | Read-only field | Relation role of the related definition on the associated definition. | Parent or Child | Yes |
Label | String | Label of the member as displayed in the UI. | Plaintext value | No |
Help text | String | Visual hint displayed below the field in edit mode. | Plaintext value | No |
Associated label | String | Defines how the associated entity displays the relation. | Plaintext value | No |
Associated definition | Drop-down list | The entity definition the current entity relates to. | Entity definitions in your solution. | Yes |
Cardinality | Drop-down list | Degree of relationship. The first item represents the number of occurrences in one entity which are associated to the number of occurrences in the second entity depicted by the second item. | OneToOne, OneToMany, or ManyToMany | Yes |
Note
You can translate plaintext values for different cultures.
Conditional
You can set conditions to only display the relation member on the entity when they are met.
In the following example, according to the conditional configuration, the relation member is displayed only if the Asset type of the entity is Logo or Social Media Asset:
Required
You can specify whether the relation requires parents or children and set conditional validations on them.
If you set the parent or child as required and configure conditional validations, the parent or child member becomes a mandatory field when all the conditions are met.
If you set the parent or child as required but do not configure any conditions, the member becomes a fully mandatory field.
The following example sets parent conditional validations on a member of the entity definition M.Asset:
The conditional validations on the depicted member of M.Asset results in the member being mandatory when an M.Asset entity belongs to the Standard ContentRepository and is in the UnderReview or Approved FinalLifeCycleStatus.
Advanced
The following table describes advanced parameters of the relation member:
Field | Type | Description | Value | Mandatory |
---|---|---|---|---|
Path relation | Toggle switch | Creates a related path on the child side of the relation. This allows for path expansion of hierarchical entities on a related entity. | Enabled/Disabled | No |
Is path hierarchy relation | Toggle switch | Connects path-enabled definitions and hierarchical definitions. Creates a path hierarchy. This is typically set on self-relations. | Enabled/Disabled | No |
Path hierarchy score | Numerical value | Score given to the relation which is marked as IsPathHierarchyRelation. If an entity has multiple parent hierarchy relations, the paths of the entity are sorted according to this score in ascending way. The first path, if not marked otherwise, is used as a sole entity path when only one path is required. | Numerical value between 0 and 255. | No |
Taxonomy relation | Toggle switch | Defines whether the relation is taken into account when faceting. | Enabled/Disabled | No |
Is taxonomy hierarchy relation | Toggle switch | Defines the taxonomy hierarchy for entities of this definition. This is typically set on self-relations and is taken into account when faceting. Due to the nature of self-relations, you can have only one taxonomy hierarchy relation per definition. | Enabled/Disabled | No |
Is rendition relation | Toggle switch | Sets the relation as source of rendition. The main rendition of the entity is always determined by this relation. An entity cannot have more than one relation with this option on. | Enabled/Disabled | No |
Content copied | Toggle switch | Determines whether the full-text content is inherited through the relation (inheritance only goes from parent to child). As a result, you can search for the child entity based on the full-text content of the parent entity. | Enabled/Disabled | No |
Completion copied | Toggle switch | Determines whether the auto-completion content is inherited through the relation (inheritance only goes from parent to child). As a result, the auto-completion available when searching for the child entity is based on the auto-completion content of the parent entity. | Enabled/Disabled | No |
Allow navigation | Toggle switch | Defines whether navigation over this relation is allowed via the REST API. This is typically set to false on the parent side of relations which can contain a huge amount of children entities. | Enabled/Disabled | No |
Inherits security | Toggle switch | Determines whether security is inherited or broken at entity level. This is typically used for pages. | Enabled/Disabled | No |
Secured | Toggle switch | Indicates whether the relation is visible to all users or only to those with sufficient access rights. | Enabled/Disabled | No |
Allow updates | Toggle switch | Defines whether the value of this property can be updated via the REST API. This is typically set to false for technical properties, for example: Renditions. | Enabled/Disabled | No |
Nested | Toggle switch | Allows for a nested relational model. Defines whether this relation is nested. This means that the id and properties of the related entities are directly included in the requested entity resource. | Enabled/Disabled | No |
Include permissions | Toggle switch | Includes the related entity permissions in the entity resource. | Enabled/Disabled | No |
Include properties | Drop-down list | Includes the related entity selected properties in the entity resource. | Type, Settings, Action Execution Scope, Action label, Name, Date modified, Created | No |
Important
Do not enable Allow navigation for relations that have large numbers of children entities, because this can result in significant performance issues.
Can we improve this article ? Provide feedback