API Reference
interfaces
Relationmetadata

@coasys/ad4m / Exports / RelationMetadata

Interface: RelationMetadata

Metadata for a single relation extracted from decorators.

Table of contents

Properties

Properties

direction

• Optional direction: "reverse" | "forward"

Link direction: 'forward' for HasMany/HasOne, 'reverse' for BelongsToMany/BelongsToOne

Defined in

core/src/model/types.ts:771 (opens in a new tab)


filter

• Optional filter: boolean

Whether to auto-generate a conformance filter when target is set. Defaults to true — set to false to opt out of DB-level type filtering.

Defined in

core/src/model/types.ts:785 (opens in a new tab)


getter

• Optional getter: string

Custom getter code

Defined in

core/src/model/types.ts:765 (opens in a new tab)


local

• Optional local: boolean

Whether stored locally only

Defined in

core/src/model/types.ts:769 (opens in a new tab)


name

• name: string

The relation name

Defined in

core/src/model/types.ts:761 (opens in a new tab)


ordering

• Optional ordering: Object

CRDT ordering config, when this collection has a user-controlled order.

Its presence is what makes a reorder count as a change: for an ordered relation the sequence is the state, where an unordered one is a set.

Type declaration

NameType
strategy"linkedList"

Defined in

core/src/model/types.ts:778 (opens in a new tab)


predicate

• predicate: string

The predicate URI (through value)

Defined in

core/src/model/types.ts:763 (opens in a new tab)


readOnly

• Optional readOnly: boolean

No writer for this relation: save() and create() skip it

Defined in

core/src/model/types.ts:767 (opens in a new tab)


target

• Optional target: () => any

Type declaration

▸ (): any

Target model class thunk for hydration and type filtering

Returns

any

Defined in

core/src/model/types.ts:780 (opens in a new tab)


where

• Optional where: Where

Where clause for relation filtering (query DSL)

Defined in

core/src/model/types.ts:787 (opens in a new tab)