updated mysql adapter to support boolean definition
updated mysql adapter to treat boolean type fields like in rails, it means that boolean values will be converted to integer(1 for true and 0 for false) values
This commit is contained in:
parent
abde0df35b
commit
f51990949f
|
@ -100,6 +100,7 @@ MySQL.prototype.toDatabase = function (prop, val) {
|
|||
].join('-');
|
||||
return this.client.escape(val);
|
||||
}
|
||||
if (prop.type.name == "Boolean") return val ? 1 : 0;
|
||||
return this.client.escape(val.toString());
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue