sequelize/sequelize — pull request #2810 by janmeier (2014-12-30 23:16:40+00:00)
Title: CLS support in transactions

This PR adds support for automagically passing the current transaction to all queries within the callback passed to sequelize.transaction. For example:

```js
sequelize.transaction(function (t) {
// Normally you'd have to pass { transaction: t }, but CLS handles that automagically
User.find(where);

// To disable automatic passing, pass another transaction, or null for no transaction
User.find(where, { transaction: t2 });
User.find(where, { transaction: null });
});
```

This is still WIP - I'd like to add docs in this PR as well

Adresses https://github.com/sequelize/sequelize/issues/2717 and

Closes https://github.com/sequelize/sequelize/issues/1627