Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.

Latest commit

 

History

History
94 lines (52 loc) · 2.84 KB

ifieldrelationship.md

File metadata and controls

94 lines (52 loc) · 2.84 KB

redux-data-service > IFieldRelationship

Interface: IFieldRelationship

This is the meta-data about a related field on a Model, such as a BelongsTo or HasMany field. It enables us to lazy-load the related model(s) given a field which specifies the related ID(s) and the related service name.

For example, field "student" relates to the "student" service through the "studentId" relatedFieldName.

Hierarchy

IFieldRelationship

Index

Properties


Properties

field

● field: string

Defined in Model/Decorators/Relationship.ts:22

The name of the field this relationship decorates


<Optional> modelRelatedFieldName

● modelRelatedFieldName: string

Defined in Model/Decorators/Relationship.ts:34

The name of the field on the OTHER model which provides the ID of THIS model


relatedFieldName

● relatedFieldName: string

Defined in Model/Decorators/Relationship.ts:31

The field on THIS model which provides the ID or IDs to identify the OTHER model


<Optional> serviceName

● serviceName: string

Defined in Model/Decorators/Relationship.ts:25

The name of the service associated to the related field


<Optional> serviceNameField

● serviceNameField: string

Defined in Model/Decorators/Relationship.ts:28

When no serviceName is given, we will use the value of this field to get the name of the related service


type

● type: RelationshipType

Defined in Model/Decorators/Relationship.ts:37

The type of relationship, i.e. BelongsTo (one-to-one or one-to-many) or HasMany (many-to-many, many-to-one)