diff --git a/package.json b/package.json index 6ed851e..c02a87c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/database", - "version": "4.28.0", + "version": "4.29.0", "description": "The Athenna database handler for SQL/NoSQL.", "license": "MIT", "author": "João Lenon ", diff --git a/src/factories/ConnectionFactory.ts b/src/factories/ConnectionFactory.ts index 57fab05..c21fc3d 100644 --- a/src/factories/ConnectionFactory.ts +++ b/src/factories/ConnectionFactory.ts @@ -132,7 +132,12 @@ export class ConnectionFactory { mongoose.set('debug', configs.debug) } - const options = Json.omit(configs, ['url', 'debug', 'driver']) + const options = Json.omit(configs, [ + 'url', + 'debug', + 'validations', + 'driver' + ]) debug('creating new connection using mongoose. options defined: %o', { url: configs.url, @@ -161,7 +166,7 @@ export class ConnectionFactory { }, debug: false, useNullAsDefault: false, - ...Json.omit(configs, ['driver']) + ...Json.omit(configs, ['driver', 'validations']) } debug('creating new connection using Knex. options defined: %o', options)