Merge pull request #43 from bergie/master

Fix unconstrained all on MySQL
This commit is contained in:
1602 2012-03-06 06:10:39 -08:00
commit 028375b16e
1 changed files with 3 additions and 0 deletions

View File

@ -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 ');
}