Update lib/adapters/postgres.js

fix to add quotes around key so that it works for mixed-case correctly
This commit is contained in:
clarktlaugh 2012-09-29 20:35:39 -05:00
parent 451000806d
commit f3bafd7bf9
1 changed files with 1 additions and 1 deletions

View File

@ -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 += ' > ';