Skip to main content
zerotal

Documentation


Documentation / @zerotal/orm / index / MorphOneOptions

Interface: MorphOneOptions

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

Properties

morphName

morphName: string

Defined in: packages/orm/src/model/decorators/morphOne.ts:8

The morph name — prefix for the _type and _id columns on the related table. e.g. morphName: 'imageable' → columns imageable_type, imageable_id.


localKey?

optional localKey?: string

Defined in: packages/orm/src/model/decorators/morphOne.ts:10

Override the local key. Defaults to 'id'.