diff --git a/package-lock.json b/package-lock.json index 44726b7..759f9ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/database", - "version": "4.14.3", + "version": "4.14.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/database", - "version": "4.14.3", + "version": "4.14.4", "license": "MIT", "dependencies": { "@faker-js/faker": "^8.3.0", diff --git a/package.json b/package.json index 1709c3a..a53c920 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/database", - "version": "4.14.3", + "version": "4.14.4", "description": "The Athenna database handler for SQL/NoSQL.", "license": "MIT", "author": "João Lenon ", diff --git a/src/models/builders/ModelQueryBuilder.ts b/src/models/builders/ModelQueryBuilder.ts index dd924ca..d6d0bee 100644 --- a/src/models/builders/ModelQueryBuilder.ts +++ b/src/models/builders/ModelQueryBuilder.ts @@ -960,6 +960,10 @@ export class ModelQueryBuilder< for (const column of this.schema.getAllUniqueColumns()) { const value = data[column.name] + if (value === undefined) { + continue + } + if (isUpdate) { const data = await this.Model.query() .where(column.name as never, value)