Fix the orderBy

This commit is contained in:
Raymond Feng 2013-12-05 16:08:32 -08:00
parent 079e95d89e
commit ae488942bb
1 changed files with 2 additions and 4 deletions

View File

@ -31,9 +31,7 @@ exports.initialize = function initializeDataSource(dataSource, callback) {
s.supportBigNumbers = (s.supportBigNumbers || false); s.supportBigNumbers = (s.supportBigNumbers || false);
s.timezone = (s.timezone || 'local'); s.timezone = (s.timezone || 'local');
if(isNaN(s.connectionLimit)) { if(!isNaN(s.connectionLimit)) {
s.connectionLimit = s.connectionLimit;
} else {
s.connectionLimit = 10; s.connectionLimit = 10;
} }
@ -473,7 +471,7 @@ MySQL.prototype.all = function all(model, filter, callback) {
if (!filter.order) { if (!filter.order) {
var idNames = this.idNames(model); var idNames = this.idNames(model);
if (idNames && idNames.length) { if (idNames && idNames.length) {
filter.order = idNames.join(' '); filter.order = idNames;
} }
} }