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

Commit 37f0aa66 by Sascha Depold

we have to start the transaction before we can set the isolation level

1 parent 65024a07
Showing with 7 additions and 4 deletions
...@@ -37,11 +37,14 @@ Transaction.prototype.rollback = function() { ...@@ -37,11 +37,14 @@ Transaction.prototype.rollback = function() {
} }
Transaction.prototype.prepareEnvironment = function(callback) { Transaction.prototype.prepareEnvironment = function(callback) {
var self = this var self = this
, connectorManager = self.sequelize.transactionManager.getConnectorManager(this.id)
this.setIsolationLevel(function() { this.begin(function() {
self.setAutocommit(function() { self.setIsolationLevel(function() {
self.begin(callback) self.setAutocommit(function() {
connectorManager.afterTransactionSetup(callback)
})
}) })
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!