Page Contents
Home > @loopback/repository > ModelDefinition > addRelation
ModelDefinition.addRelation() method
Define a new relation.
Signature:
addRelation(definition: RelationMetadata): this;
Parameters
| Parameter | Type | Description |
|---|---|---|
| definition | RelationMetadata | The definition of the new relation. |
Returns:
this