You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 29, 2024. It is now read-only.
Is there support for multiple object types within one container? If there is, how to handle transaction management for this? After reading CosmosDB documentation, this approach is recommended when objects share the same partition key. I want to do this because I need to persist multiple objects within one transaction and following CosmosDB documentation they need to be in the same logical partition therefore:
"Only documents from the same logical partition can participate in a single transaction. Consequently, writes to different containers can’t be a part of the same transaction."
Example of one container from Cosmos DB documentation:
`
{
"id": "",
"type": "post",
"postId": "",
"userId": "",
"title": "",
"content": "",
"creationDate": ""
}
{
"id": "",
"type": "like",
"postId": "",
"userId": "",
"creationDate": ""
}
`
Is it possible to have a Post, Comments and Like repository? Can I set the type anywhere?
Personal example:
I have documents en batches. A batch can have a lot of documents (1-N). When I receive a document I would like to create the document and upsert the batch. The reason I would like to upsert the batch is to avoid complex queries afterwards and to work event driven (once I have all documents I will start processing the batch).