postgrelize / IncludeThroughOptions
Type Alias: IncludeThroughOptions ​
IncludeThroughOptions =
Readonly<{attributes?:FindAttributeOptions;where?:unknown; }>
Defined in: src/associations/include.ts:17
Options of the junction table of an included belongsToMany association.
Example ​
ts
const through: IncludeThroughOptions = { attributes: ['role'], where: { role: 'owner' } };
const rows = await Project.findAll({ include: [{ model: User, through }] });