From b5eaa99d5abf6ebee529c1d765f86695fe75b4fa Mon Sep 17 00:00:00 2001 From: Dombi Attila Date: Thu, 19 Jul 2012 18:26:58 +0300 Subject: [PATCH] Added stricter value checking on number. --- lib/adapters/postgres.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; }