Update lib/adapters/postgres.js
fix to add quotes around key so that it works for mixed-case correctly
This commit is contained in:
parent
451000806d
commit
f3bafd7bf9
|
@ -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 += ' > ';
|
||||
|
|
Loading…
Reference in New Issue