Merge pull request #127 from clarktlaugh/master

add quotes around key to allow mixed-case to work correctly
This commit is contained in:
Anatoliy Chakkaev 2012-10-01 01:06:26 -07:00
commit d54cf8f0c1
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 += ' > ';