不要怂,就是干,撸起袖子干!

Commit 40c205f5 by Sascha Depold

use fully qualified method signature for sequelize.query

1 parent ea479472
Showing with 12 additions and 4 deletions
......@@ -230,12 +230,20 @@ module.exports = (function() {
// private
var query = function() {
var args = Utils._.map(arguments, function(arg, _) { return arg })
, s = this.daoFactoryManager.sequelize
var args = Utils._.map(arguments, function(arg, _) { return arg })
, sequelize = this.daoFactoryManager.sequelize
// add this as the second argument
if(arguments.length == 1) args.push(this)
return s.query.apply(s, args)
if (arguments.length === 1) {
args.push(this)
}
// add {} as options
if (args.length === 2) {
args.push({})
}
return sequelize.query.apply(sequelize, args)
}
var addOptionalClassMethods = function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!