sequelize/sequelize — pull request #528 by mickhansen (2013-04-09 15:10:55+00:00)
Title: CustomEventEmitter.proxy method

Proxies events from one emitter to another.
It would be very usual to have in cases where you have to return an emitter because another emitter is run later (but it's actually the one you want).

Example:

save: function (model) {
var emitter = new sequelize.CustomEventEmitter();

model.getStuff().done(function (err, result) {
// check stuff
model.save().proxy(emitter);
});

return emitter.run();
}