From f3bafd7bf984cf232d5d55026d047405297a68a0 Mon Sep 17 00:00:00 2001 From: clarktlaugh Date: Sat, 29 Sep 2012 20:35:39 -0500 Subject: [PATCH] Update lib/adapters/postgres.js fix to add quotes around key so that it works for mixed-case correctly --- 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 8ff35e90..cc0caf7d 100644 --- a/lib/adapters/postgres.js +++ b/lib/adapters/postgres.js @@ -237,7 +237,7 @@ PG.prototype.toFilter = function (model, filter) { fields.push('"' + key + '" IS ' + filterValue); } else if (conds[key].constructor.name === 'Object') { var condType = Object.keys(conds[key])[0]; - var sqlCond = key; + var sqlCond = '"' + key + '"'; switch (condType) { case 'gt': sqlCond += ' > ';