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

Commit 9a59b63e by Sascha Depold

removed overengineering

1 parent 19d18ae6
Showing with 3 additions and 6 deletions
......@@ -446,9 +446,8 @@ module.exports = (function() {
QueryInterface.prototype.insert = function(dao, tableName, values, options) {
var sql = this.QueryGenerator.insertQuery(tableName, values, dao.daoFactory.rawAttributes)
return queryAndEmit.call(this, [sql, dao], 'insert', {
success: function(obj) { obj.isNewRecord = false },
transaction: (options || {}).transaction
return queryAndEmit.call(this, [sql, dao, options], 'insert', {
success: function(obj) { obj.isNewRecord = false }
})
}
......@@ -887,11 +886,9 @@ module.exports = (function() {
sqlOrQueryParams.push({})
}
sqlOrQueryParams[2].transaction = options.transaction
emitter.query = this.sequelize.query.apply(this.sequelize, sqlOrQueryParams)
} else {
emitter.query = this.sequelize.query(sqlOrQueryParams, null, { transaction: options.transaction })
emitter.query = this.sequelize.query(sqlOrQueryParams, null, { })
}
emitter
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!