Skip to content

Commit

Permalink
fix: remove __v from model instance
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Mar 21, 2022
1 parent c42d6a4 commit 4c543fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
Expand Down
2 changes: 2 additions & 0 deletions src/Utils/ModelGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 4c543fc

Please sign in to comment.