From fe025570035a7c8285061bb2ba9d144a33d73b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E6=98=B6?= Date: Mon, 6 Jun 2022 22:59:35 +0800 Subject: [PATCH] fix: has one bug (#478) --- packages/core/database/src/update-associations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/database/src/update-associations.ts b/packages/core/database/src/update-associations.ts index f30881482..d9bb95889 100644 --- a/packages/core/database/src/update-associations.ts +++ b/packages/core/database/src/update-associations.ts @@ -297,7 +297,7 @@ export async function updateSingleAssociation( // @ts-ignore dataKey = association.targetKey; } else { - M = association.source as ModelCtor; + M = association.target as ModelCtor; dataKey = M.primaryKeyAttribute; }