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

Commit 5c079457 by Mick Hansen

Merge branch 'master' into milestones/2.0.0

2 parents 8e869b22 9e1fdcda
Showing with 6 additions and 2 deletions
...@@ -5,7 +5,7 @@ Notice: All 1.7.x changes are present in 2.0.x aswell ...@@ -5,7 +5,7 @@ Notice: All 1.7.x changes are present in 2.0.x aswell
- fixes a hangup issue for mysql [#1244](https://github.com/sequelize/sequelize/pull/1244) - fixes a hangup issue for mysql [#1244](https://github.com/sequelize/sequelize/pull/1244)
- improves handling of uncaught errors in eventemitter [#1245](https://github.com/sequelize/sequelize/pull/1245) - improves handling of uncaught errors in eventemitter [#1245](https://github.com/sequelize/sequelize/pull/1245)
- fixes bug with mysql replication and pool settings [#1251](https://github.com/sequelize/sequelize/pull/1251) - fixes bug with mysql replication and pool settings [#1251](https://github.com/sequelize/sequelize/pull/1251)
- through models created by N:M associations no longer inherit hooks [#1263](https://github.com/sequelize/sequelize/issues/1263) - fixes bug where through models created by N:M associations would inherit hooks [#1263](https://github.com/sequelize/sequelize/issues/1263)
- .col()/.literal()/etc now works with findAll [#1249](https://github.com/sequelize/sequelize/issues/1249) - .col()/.literal()/etc now works with findAll [#1249](https://github.com/sequelize/sequelize/issues/1249)
- now currectly handles connection timeouts as errors [#1207](https://github.com/sequelize/sequelize/issues/1207) - now currectly handles connection timeouts as errors [#1207](https://github.com/sequelize/sequelize/issues/1207)
......
...@@ -919,19 +919,23 @@ module.exports = (function() { ...@@ -919,19 +919,23 @@ module.exports = (function() {
emitter emitter
.query .query
.proxy(emitter)
.success(function(obj) { .success(function(obj) {
if (options.success) { if (options.success) {
options.success(obj) options.success(obj)
} }
this.emit(methodName, null) this.emit(methodName, null)
emitter.emit('success', obj)
}.bind(this)) }.bind(this))
.error(function(err) { .error(function(err) {
if (options.error) { if (options.error) {
options.error(err) options.error(err)
} }
this.emit(methodName, err) this.emit(methodName, err)
emitter.emit('error', err)
}.bind(this)) }.bind(this))
.on('sql', function(sql) {
emitter.emit('sql', sql)
})
}.bind(this) }.bind(this)
if (!!emitter) { if (!!emitter) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!