Documentation / zerotal / orm / MorphToManyOptions
Interface: MorphToManyOptions
Defined in: packages/orm/src/model/decorators/morphToMany.ts:3
Properties
morphName
morphName:
string
Defined in: packages/orm/src/model/decorators/morphToMany.ts:5
Morph name — prefix for the pivot {name}_id / {name}_type columns (e.g. 'taggable').
relatedPivotKey
relatedPivotKey:
string
Defined in: packages/orm/src/model/decorators/morphToMany.ts:7
FK on the pivot table referencing the related model (e.g. 'tag_id').
pivotTable?
optionalpivotTable?:string
Defined in: packages/orm/src/model/decorators/morphToMany.ts:9
Pivot table name. Defaults to {morphName}s.
withPivot?
optionalwithPivot?:string[]
Defined in: packages/orm/src/model/decorators/morphToMany.ts:11
Extra pivot columns to hydrate.
withTimestamps?
optionalwithTimestamps?:boolean
Defined in: packages/orm/src/model/decorators/morphToMany.ts:13
Maintain pivot timestamps.