Permalink
Browse files

fix: a bug in findWithCache in mysql adapter with single option

  • Loading branch information...
XadillaX committed Oct 10, 2016
1 parent c028bf5 commit a1f411c2ccc498a6b0d592560a82db98b606e097
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/adapters/mysql.js
@@ -655,6 +655,11 @@ class MySQLAdapter extends Adapter {

options.fields = origFields;
const extraSql = self.makeSql("find", model, options);

if(options.single) {
return callback(err, liteResult.length ? liteResult[0] : null, extraSql);
}

return callback(err, liteResult, extraSql);
}
});

0 comments on commit a1f411c

Please sign in to comment.