From e6f99735317d4956b446fb9684b4349769e4d420 Mon Sep 17 00:00:00 2001 From: chenos Date: Mon, 7 Dec 2020 17:13:42 +0800 Subject: [PATCH] fix: model update associations with transaction in hook --- .../plugin-collections/src/hooks/collections-after-create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-collections/src/hooks/collections-after-create.ts b/packages/plugin-collections/src/hooks/collections-after-create.ts index 4b409c7e9..a255aa729 100644 --- a/packages/plugin-collections/src/hooks/collections-after-create.ts +++ b/packages/plugin-collections/src/hooks/collections-after-create.ts @@ -73,5 +73,5 @@ export default async function (model: CollectionModel, options: any = {}) { if (migrate) { await model.migrate(); } - await model.updateAssociations(defaultValues); + await model.updateAssociations(defaultValues, options); }