MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / addRelation

Method addRelation

packages/repository/src/model.ts:185–188  ·  view source on GitHub ↗

* Define a new relation. * @param definition - The definition of the new relation.

(definition: RelationMetadata)

Source from the content-addressed store, hash-verified

183 * @param definition - The definition of the new relation.
184 */
185 addRelation(definition: RelationMetadata): this {
186 this.relations[definition.name] = definition;
187 return this;
188 }
189
190 /**
191 * Define a new belongsTo relation.

Callers 6

belongsToMethod · 0.95
hasOneMethod · 0.95
hasManyMethod · 0.95
referencesManyMethod · 0.95
model.unit.tsFile · 0.80
OrderClass · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected