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

model/types.ts:160 (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

model/types.ts:167 (opens in a new tab)


getter

Optional getter: string

Custom SurrealQL getter code

Defined in

model/types.ts:156 (opens in a new tab)


local

Optional local: boolean

Whether stored locally only

Defined in

model/types.ts:158 (opens in a new tab)


name

name: string

The relation name

Defined in

model/types.ts:152 (opens in a new tab)


predicate

predicate: string

The predicate URI (through value)

Defined in

model/types.ts:154 (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

model/types.ts:162 (opens in a new tab)


where

Optional where: Where

Where clause for relation filtering (query DSL)

Defined in

model/types.ts:169 (opens in a new tab)