diff --git a/lib/adapters/postgres.js b/lib/adapters/postgres.js index 52701e04..c2f53631 100644 --- a/lib/adapters/postgres.js +++ b/lib/adapters/postgres.js @@ -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'; }