diff --git a/lib/adapters/mysql.js b/lib/adapters/mysql.js index 232a38bc..2fd19a06 100644 --- a/lib/adapters/mysql.js +++ b/lib/adapters/mysql.js @@ -238,6 +238,10 @@ MySQL.prototype.all = function all(model, filter, callback) { } else if (conds[key].constructor.name === 'Object') { var condType = Object.keys(conds[key])[0]; var sqlCond = keyEscaped; + if ((condType == 'inq' || condType == 'nin') && val.length == 0) { + cs.push(condType == 'inq' ? 0 : 1); + return true; + } switch (condType) { case 'gt': sqlCond += ' > ';