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

Method referencesMany

packages/repository/src/model.ts:249–260  ·  view source on GitHub ↗

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

(
    name: string,
    definition: Omit<ReferencesManyDefinition, 'name' | 'type' | 'targetsMany'>,
  )

Source from the content-addressed store, hash-verified

247 * @param definition - The definition of the referencesMany relation.
248 */
249 referencesMany(
250 name: string,
251 definition: Omit<ReferencesManyDefinition, 'name' | 'type' | 'targetsMany'>,
252 ): this {
253 const meta: ReferencesManyDefinition = {
254 ...definition,
255 name,
256 type: RelationType.referencesMany,
257 targetsMany: true,
258 };
259 return this.addRelation(meta);
260 }
261
262 /**
263 * Get an array of names of ID properties, which are specified in

Callers

nothing calls this directly

Calls 1

addRelationMethod · 0.95

Tested by

no test coverage detected