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 }; } }