Reputation: 1463
I wanted to prevent any document create/update in Cosmos db with empty or null PartitionKey
. Is this possible from a db level?
Upvotes: 0
Views: 251
Reputation: 733
If your collection is setup with a partition key, I don't see how you can update it using any SDK without specifying it because how would CosmosDB know in what partition to put it?
Of course if you create a null partition key that is a different story.
Upvotes: 0
Reputation: 136196
AFAIK, it is not possible to enforce this constraint from the database level. You would need to implement this from the application side only.
Upvotes: 2