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);
|
fields.push('"' + key + '" IS ' + filterValue);
|
||||||
} else if (conds[key].constructor.name === 'Object') {
|
} else if (conds[key].constructor.name === 'Object') {
|
||||||
var condType = Object.keys(conds[key])[0];
|
var condType = Object.keys(conds[key])[0];
|
||||||
var sqlCond = key;
|
var sqlCond = '"' + key + '"';
|
||||||
switch (condType) {
|
switch (condType) {
|
||||||
case 'gt':
|
case 'gt':
|
||||||
sqlCond += ' > ';
|
sqlCond += ' > ';
|
||||||
|
|
Loading…
Reference in New Issue