不要怂,就是干,撸起袖子干!

Commit fbe3d330 by Lachèze Alexandre

add comments in dao#build code

1 parent 358c9c08
Showing with 2 additions and 0 deletions
......@@ -154,10 +154,12 @@ module.exports = (function() {
instance.__factory = this
Utils._.map(this.attributes, function(definition, name) {
//transform integer 0,1 into boolean
if(definition.indexOf(DataTypes.BOOLEAN) !== -1 && typeof instance[name] === "number") {
instance[name] = (instance[name] === 0) ? false : true;
}
//add default attributes
if(typeof instance[name] == 'undefined') {
var value = null
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!