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

Commit 336f6017 by Sascha Depold

fixed api usage

1 parent 6086024c
Showing with 5 additions and 5 deletions
...@@ -396,7 +396,7 @@ module.exports = (function() { ...@@ -396,7 +396,7 @@ module.exports = (function() {
Utils.tick(function() { Utils.tick(function() {
self self
.getQueryInterface() .getQueryInterface()
.startTransaction({ transaction: transaction }) .startTransaction(transaction, {})
.success(function() { .success(function() {
callback(transaction) callback(transaction)
}) })
......
...@@ -10,18 +10,18 @@ var Transaction = module.exports = function(sequelize, options) { ...@@ -10,18 +10,18 @@ var Transaction = module.exports = function(sequelize, options) {
util.inherits(Transaction, Utils.CustomEventEmitter) util.inherits(Transaction, Utils.CustomEventEmitter)
Transaction.prototype.commit = function() { Transaction.prototype.commit = function() {
this return this
.sequelize .sequelize
.getQueryInterface() .getQueryInterface()
.commitTransaction({ transaction: this }) .commitTransaction(this, {})
.proxy(this) .proxy(this)
} }
Transaction.prototype.rollback = function() { Transaction.prototype.rollback = function() {
this return this
.sequelize .sequelize
.getQueryInterface() .getQueryInterface()
.rollbackTransaction({ transaction: this }) .rollbackTransaction(this, {})
.proxy(this) .proxy(this)
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!