diff --git a/packages/mongodb-controller/lib/controller/default.ts b/packages/mongodb-controller/lib/controller/default.ts index 59b91af4..e7b96605 100644 --- a/packages/mongodb-controller/lib/controller/default.ts +++ b/packages/mongodb-controller/lib/controller/default.ts @@ -68,7 +68,7 @@ export class Controller extends EventEmitte this.#collection = null as never as Collection this.collection = collection this.#indexes = [] - this.#indexes.push([{ id: 1 }, { background: false, unique: true }]) + this.#indexes.push([{ uid: 1 }, { background: false, unique: true }]) this.#indexes.push(...(options?.indexes ?? [])) this.#fields = [] this.schema = options?.schema ?? { type: 'object', properties: {} }