Skip to main content

Nested Transactions

Another way to create two connected subjects at once is to use nested transactions. Instead of using a tempid, you can add a map that defines the new subject directly inside of another subject, for example:

"_id": "chat",
"message": "I just want to say hi!",
"person": {
"_id": "person",
"handle": "dLawson",
"fullName": "Dawson Lawson"

Using Nested Transactions, Add a Person and a Chat

Write a transaction!

Using the above transaction example, create your own person and chatby nesting the person transaction within the chat transaction.