Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 31bb004

Browse files
author
Dekel Barzilay
committed
Added README section on transaction
1 parent 670ed35 commit 31bb004

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,13 @@ included in `$eager` query._
374374
375375
- **`mergeAllowInsert`** - Merge given expression into `allowedInsert`.
376376
377+
### Transaction
378+
379+
[Create a transaction](https://vincit.github.io/objection.js/guide/transactions.html#creating-a-transaction)
380+
object and pass it to series of service calls using the `transaction` params operator.
381+
Commit the transaction by calling `await transaction.trx.commit()`.
382+
Rollback by calling `await transaction.trx.rollback()`.
383+
377384
### Service
378385
379386
users.service.js

0 commit comments

Comments
 (0)