fix: association destroy with individualHooks
This commit is contained in:
parent
b2801a00dc
commit
1aa7ee65ab
@ -337,7 +337,8 @@ export async function destroy(ctx: Context, next: Next) {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
ctx.body = await TargetModel.destroy({
|
ctx.body = await TargetModel.destroy({
|
||||||
where: { [primaryKey]: { [Op.in]: models.map(item => item[primaryKey]) } },
|
where: { [primaryKey]: { [Op.in]: models.map(item => item[primaryKey]) } },
|
||||||
...commonOptions
|
...commonOptions,
|
||||||
|
individualHooks: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user