diff --git a/package.json b/package.json index 6d11cfb..97ad058 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@secjs/orm", - "version": "1.0.2", + "version": "1.0.3", "description": "Handle your application models in Node.js. Built on top of @secjs/database.", "license": "MIT", "author": "João Lenon ", diff --git a/src/Utils/ModelGenerator.ts b/src/Utils/ModelGenerator.ts index 6213630..280fc98 100644 --- a/src/Utils/ModelGenerator.ts +++ b/src/Utils/ModelGenerator.ts @@ -44,6 +44,8 @@ export class ModelGenerator { const columnDictionary = SubClassModel.columnDictionary Object.keys(data).forEach(key => { + if (key === '__v') return + if (!columnDictionary[key]) { throw new NotMappedColumnException(key, SubClassModel.name) }