Skip to main content
zerotal

Documentation


Documentation / @zerotal/orm / index / HasManyThroughOptions

Interface: HasManyThroughOptions

Defined in: packages/orm/src/model/decorators/hasManyThrough.ts:3

Properties

firstKey

firstKey: string

Defined in: packages/orm/src/model/decorators/hasManyThrough.ts:5

FK on the through table referencing the parent (e.g. 'country_id' on users).


secondKey

secondKey: string

Defined in: packages/orm/src/model/decorators/hasManyThrough.ts:7

FK on the related table referencing the through model (e.g. 'user_id' on posts).


localKey?

optional localKey?: string

Defined in: packages/orm/src/model/decorators/hasManyThrough.ts:9

Parent local key the firstKey references. Default 'id'.


throughLocalKey?

optional throughLocalKey?: string

Defined in: packages/orm/src/model/decorators/hasManyThrough.ts:11

Through local key the secondKey references. Default 'id'.