From 9ed6993130e93783e4bbacae7d8f980922cc73a3 Mon Sep 17 00:00:00 2001 From: ChengLei Shao Date: Tue, 28 Nov 2023 14:59:43 +0800 Subject: [PATCH] fix: query view collection with primaryKey (#3104) --- packages/core/database/src/collection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/database/src/collection.ts b/packages/core/database/src/collection.ts index 3a4ad53c8..f112bb285 100644 --- a/packages/core/database/src/collection.ts +++ b/packages/core/database/src/collection.ts @@ -307,7 +307,7 @@ export class Collection< `source field "${sourceFieldName}" not found for field "${name}" at collection "${this.name}"`, ); } else { - options = { ...lodash.omit(sourceField.options, 'name'), ...options }; + options = { ...lodash.omit(sourceField.options, ['name', 'primaryKey']), ...options }; } }