diff --git a/changelog.md b/changelog.md index f489dac..7da966f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2026-04-05 - 7.1.5 - fix(collection) +ensure unique indexes are marked before upsert operations + +- calls unique index marking during collection updates before executing upsert logic +- helps keep update behavior aligned with index handling already applied on inserts + ## 2026-04-05 - 7.1.4 - fix(collection) improve index creation resilience and add collection integrity checks diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 59a89ad..f100cc9 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartdata', - version: '7.1.4', + version: '7.1.5', description: 'An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.' } diff --git a/ts/classes.collection.ts b/ts/classes.collection.ts index 83597b0..26e6ede 100644 --- a/ts/classes.collection.ts +++ b/ts/classes.collection.ts @@ -460,6 +460,7 @@ export class SmartdataCollection { ): Promise { await this.init(); await this.checkDoc(dbDocArg); + await this.markUniqueIndexes(dbDocArg.uniqueIndexes); const identifiableObject = await dbDocArg.createIdentifiableObject(); const saveableObject = await dbDocArg.createSavableObject() as any; const updateableObject: any = {};