diff --git a/lib/adapters/mysql.js b/lib/adapters/mysql.js index 3b0ad279..74acca95 100644 --- a/lib/adapters/mysql.js +++ b/lib/adapters/mysql.js @@ -241,6 +241,9 @@ MySQL.prototype.all = function all(model, filter, callback) { cs.push(keyEscaped + ' = ' + val); } }); + if (cs.length === 0) { + return ''; + } return 'WHERE ' + cs.join(' AND '); }