Added stricter value checking on number.

This commit is contained in:
Dombi Attila 2012-07-19 18:26:58 +03:00
parent e4527856ad
commit b5eaa99d5a
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ PG.prototype.toDatabase = function (prop, val) {
}
}
if (prop.type.name === 'Number') {
if (!val) {
if (!val && val!=0) {
if( prop.autoIncrement ) {
return 'DEFAULT';
}