Compare commits

...

2 Commits

Author SHA1 Message Date
afd79cfabc v7.1.5
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-04-05 03:49:56 +00:00
f3a4a3bbba fix(collection): ensure unique indexes are marked before upsert operations 2026-04-05 03:49:56 +00:00
4 changed files with 9 additions and 2 deletions

View File

@@ -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

View File

@@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartdata",
"version": "7.1.4",
"version": "7.1.5",
"private": false,
"description": "An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.",
"exports": {

View File

@@ -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.'
}

View File

@@ -460,6 +460,7 @@ export class SmartdataCollection<T> {
): Promise<any> {
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 = {};