From bd77ef2bd30bd65605ed9a466606ae140de3e2d0 Mon Sep 17 00:00:00 2001 From: Chareice Date: Fri, 9 Aug 2024 16:32:35 +0800 Subject: [PATCH] fix: collection options --- packages/core/data-source-manager/src/collection.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/core/data-source-manager/src/collection.ts b/packages/core/data-source-manager/src/collection.ts index 51e633fd17..dd6859fc75 100644 --- a/packages/core/data-source-manager/src/collection.ts +++ b/packages/core/data-source-manager/src/collection.ts @@ -15,7 +15,10 @@ export class Collection implements ICollection { repository: IRepository; fields: Map = new Map(); - constructor(protected options: CollectionOptions, protected collectionManager: ICollectionManager) { + constructor( + protected options: CollectionOptions, + protected collectionManager: ICollectionManager, + ) { this.setRepository(options.repository); if (options.fields) { @@ -23,6 +26,10 @@ export class Collection implements ICollection { } } + get name() { + return this.options.name; + } + updateOptions(options: CollectionOptions, mergeOptions?: any) { const newOptions = { ...this.options,