diff --git a/packages/database/src/collection.ts b/packages/database/src/collection.ts index baa631b67c..b10766f238 100644 --- a/packages/database/src/collection.ts +++ b/packages/database/src/collection.ts @@ -13,7 +13,7 @@ export type RepositoryType = typeof Repository; export type CollectionSortable = string | boolean | { name?: string; scopeKey?: string }; -export interface CollectionOptions extends Omit { +export interface CollectionOptions extends Omit { name: string; tableName?: string; filterTargetKey?: string; @@ -201,19 +201,11 @@ export class Collection< this.setFields(options.fields, false); this.setRepository(options.repository); - if (newOptions.hooks) { - this.setUpHooks(newOptions.hooks); - } - this.context.database.emit('afterUpdateCollection', this); return this; } - setUpHooks(bindHooks) { - (this.model)._setupHooks(bindHooks); - } - setSortable(sortable) { if (!sortable) { return;