From 1aa7ee65ab150aff5ed8515a222cdd8a95db4ee4 Mon Sep 17 00:00:00 2001 From: chenos Date: Tue, 15 Dec 2020 22:45:35 +0800 Subject: [PATCH] fix: association destroy with individualHooks --- packages/actions/src/actions/common.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/actions/src/actions/common.ts b/packages/actions/src/actions/common.ts index a7c9d140d..aa940a252 100644 --- a/packages/actions/src/actions/common.ts +++ b/packages/actions/src/actions/common.ts @@ -337,7 +337,8 @@ export async function destroy(ctx: Context, next: Next) { // @ts-ignore ctx.body = await TargetModel.destroy({ where: { [primaryKey]: { [Op.in]: models.map(item => item[primaryKey]) } }, - ...commonOptions + ...commonOptions, + individualHooks: true, }); } } else {