diff --git a/Readme.md b/Readme.md index fd6942b4..b5c7f471 100755 --- a/Readme.md +++ b/Readme.md @@ -13,7 +13,7 @@ npm install orm ## Node.js Version Support -Tests are done using [Travis CI](https://travis-ci.org/) for node versions `0.6.x`, `0.8.x` and `0.10.x`. If you want you can run +Tests are done using [Travis CI](https://travis-ci.org/) for node versions `0.8.x` and `0.10.x`. If you want you can run tests locally. ```sh diff --git a/lib/Instance.js b/lib/Instance.js index 9670ddc4..8cbb9447 100755 --- a/lib/Instance.js +++ b/lib/Instance.js @@ -481,7 +481,8 @@ function Instance(Model, opts) { // If someone complains about noise, we know it does something, and figure it out then. if (instance.hasOwnProperty(key)) console.log("Overwriting instance property"); - if (key in opts.data) { + //Undefined data values are not setted so skip to defaultvalue + if (opts.data[key] !== undefined) { defaultValue = opts.data[key]; } else if (prop && 'defaultValue' in prop) { defaultValue = prop.defaultValue;