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

Commit 5d2663d7 by Mick Hansen

[ci skip] Transaction documentation errors

1 parent f8431ac4
Showing with 3 additions and 3 deletions
......@@ -6,7 +6,7 @@ The key difference is that the managed transaction uses a callback that expects
### Auto commit/rollback
```js
return sequelize.transaction(t) {
return sequelize.transaction(function (t) {
return User.create({
firstName: 'Abraham',
lastName: 'Lincoln'
......@@ -25,9 +25,9 @@ return sequelize.transaction(t) {
});
```
### Handled by user
### Handled manually
```js
return sequelize.transaction().function (t) {
return sequelize.transaction().then(function (t) {
return User.create({
firstName: 'Homer',
lastName: 'Simpson'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!