---
title: "Class RelationDefinition"
slug: "sdk--stylelabs.m.sdk.models.base.relationdefinition"
abstract: ""
---
# Class RelationDefinition

A relation definitions.

## Inheritance

object

[MemberDefinitionBase](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberdefinitionbase.html)

RelationDefinition

## Implements

[IRelationDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.irelationdefinition.html)

[IMemberDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.imemberdefinition.html)

## Inherited Members

[MemberDefinitionBase.Name](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberdefinitionbase.html)

[MemberDefinitionBase.Labels](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberdefinitionbase.html)

[MemberDefinitionBase.HelpText](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberdefinitionbase.html)

[MemberDefinitionBase.IsConditional](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberdefinitionbase.html)

[MemberDefinitionBase.Conditions](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberdefinitionbase.html)

[MemberDefinitionBase.IsSystemOwned](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberdefinitionbase.html)

[MemberDefinitionBase.IsSecured](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberdefinitionbase.html)

[MemberDefinitionBase.AllowUpdates](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberdefinitionbase.html)

## Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsBase

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public class RelationDefinition : MemberDefinitionBase, IRelationDefinition, IMemberDefinition
```

## Properties

### AllowNavigation

Gets or sets a value indicating whether this relation can be used for navigation to parents or children in the external services (e.g. REST API). This can prevent potentially serious memory intensive operations.

#### Declaration

```csharp
public bool AllowNavigation { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### AssociatedEntityDefinitionName

Gets or sets name of the [IEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html) that is linked to the other end (see [Role](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.irelationdefinition.html)) of this [IRelationDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.irelationdefinition.html).

#### Declaration

```csharp
public string AssociatedEntityDefinitionName { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### AssociatedLabels

Gets collection of the culture specific member labels of the associated relation definition.

#### Declaration

```csharp
public IDictionary<CultureInfo, string> AssociatedLabels { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| IDictionary<, >CultureInfostring |  |

### Cardinality

Gets or sets cardinality of the relation from the **parents** point of view.

#### Declaration

```csharp
public RelationCardinality Cardinality { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| [RelationCardinality](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.relationcardinality.html) |  |

### ChildIsMandatory

Gets or sets a value indicating whether relations of this definition must have at least one child.

#### Declaration

```csharp
public bool ChildIsMandatory { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### CompletionIsCopied

Gets or sets a value indicating whether the child of the relation copies words collection, used for the auto–complete, of the ancestors connected via such marked relations into its collection of words used for the auto-complete functionality in Sitecore Content Hub web portal.

#### Declaration

```csharp
public bool CompletionIsCopied { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

## See Also

[IncludedInCompletion](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ipropertydefinition.html)

### ContentIsCopied

Gets or sets a value indicating whether if the child of the relation copies full text search content of the ancestors connected via such marked relations into its full text search content.

#### Declaration

```csharp
public bool ContentIsCopied { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

## See Also

[IncludedInContent](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ipropertydefinition.html)

### DefinitionType

Gets type of the member.

#### Declaration

```csharp
public override MemberDefinitionType DefinitionType { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| [MemberDefinitionType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.memberdefinitiontype.html) |  |

#### Overrides

[MemberDefinitionBase.DefinitionType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberdefinitionbase.html)

### InheritsSecurity

Gets or sets a value indicating whether if this relation is used to inherit any security related meta data (from the parents towards the children).

#### Declaration

```csharp
public bool InheritsSecurity { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsNested

Gets or sets a value indicating whether the relation allows nesting of properties on the associated entity when accessed via the external services (e.g. REST API).

#### Declaration

```csharp
public bool IsNested { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsPathHierarchyRelation

Gets or sets a value indicating whether this relation provides a link between [IsPathEnabledDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html), thus creating a path hierarchy.

#### Declaration

```csharp
public bool IsPathHierarchyRelation { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsPathRelation

Gets or sets a value indicating whether this relation provides a link between a parent entity with [IsPathEnabledDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html) or an entity with such an ancestor.

#### Declaration

```csharp
public bool IsPathRelation { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsRenditionRelation

Gets or sets a value indicating whether this relation can be used to retrieve renditions.

#### Declaration

```csharp
public bool IsRenditionRelation { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsTaxonomyHierarchyRelation

Gets or sets a value indicating whether if the relation provides a link between parent and child taxonomy entities of the same entity definition, thus creating a taxonomy hierarchy.

#### Declaration

```csharp
public bool IsTaxonomyHierarchyRelation { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsTaxonomyRelation

Gets or sets a value indicating whether the relation establishes a taxonomy.

#### Declaration

```csharp
public bool IsTaxonomyRelation { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### NestedPermissions

Gets or sets a value indicating whether permissions are included when nesting this relation in an external service, in similar fashion as with property nesting.

#### Declaration

```csharp
public bool NestedPermissions { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### NestedProperties

Gets collection of the property names of the associated entity to be used for nesting.

#### Declaration

```csharp
public IList<string> NestedProperties { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| IList<>string |  |

### ParentIsMandatory

Gets or sets a value indicating whether relations of this definition must have at least one parent.

#### Declaration

```csharp
public bool ParentIsMandatory { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### PathHierarchyScore

Gets or sets score given to the relation which is marked as [IsPathHierarchyRelation](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.irelationdefinition.html). If entity has multiple parent hierarchy relations, the paths of entity will be sorted according to this score in ascending way. The first path, if not marked otherwise, will be used as a sole entity path when only one path is required.

#### Declaration

```csharp
public byte PathHierarchyScore { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| byte |  |

### [Role](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.sdk.resources.base.role.html)

Gets or sets role of the relation on the [IEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientitydefinition.html). Parent and child entity definitions share the same conceptual relation definition.

#### Declaration

```csharp
public RelationRole Role { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| [RelationRole](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadoptions.relationrole.html) |  |

### Implements

[IRelationDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.irelationdefinition.html)

[IMemberDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.imemberdefinition.html)
