From 1da22d4c4dc1a5cd558dc47f8a1831752ba56607 Mon Sep 17 00:00:00 2001 From: handongxun Date: Mon, 18 Apr 2022 16:42:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20unicloud-db=20foreignKey=20=E6=8F=90?= =?UTF-8?q?=E5=88=B0=20collection=20=E5=90=8E=E9=9D=A2=20where=20=E5=89=8D?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-cli-shared/components/unicloud-db.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/uni-cli-shared/components/unicloud-db.vue b/packages/uni-cli-shared/components/unicloud-db.vue index fc079218b..4440b8d60 100644 --- a/packages/uni-cli-shared/components/unicloud-db.vue +++ b/packages/uni-cli-shared/components/unicloud-db.vue @@ -441,15 +441,15 @@ export default { db = db.collection(...this.collectionArgs) + if (this.foreignKey) { + db = db.foreignKey(this.foreignKey) + } if (!(!this.where || !Object.keys(this.where).length)) { db = db.where(this.where) } if (this.field) { db = db.field(this.field) } - if (this.foreignKey) { - db = db.foreignKey(this.foreignKey) - } if (this.groupby) { db = db.groupBy(this.groupby) } -- GitLab