Skip to main content

@webda/coreReadme | API


Type alias: ModelRelated<T, _K>

ModelRelated<T, _K>: Object

Load related objects

_K is not used but is required to complete the graph

Type parameters

T extends CoreModel

_K extends Attributes<T>

Type declaration

forEach

forEach: (model) => Promise<void>

Parameters

model: T

Iterate through all related objects

Returns

Promise<void>

getAll

getAll: () => Promise<T[]>

Get all object linked

Returns

Promise<T[]>

query

query: (query?) => Promise<Object>

Query the related objects

Parameters

query?: string

Returns

Promise<Object>

continuationToken?

continuationToken?: string

results

results: T[]

Source

packages/core/src/models/relations.ts:43