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

Commit 40c205f5 by Sascha Depold

use fully qualified method signature for sequelize.query

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