Elfocrash / Cosmonaut

🌐 A supercharged Azure CosmosDB .NET SDK with ORM support
https://cosmonaut.readthedocs.io
MIT License
341 stars 44 forks source link

PartitionKey exception during upsert #88

Closed sivafirst closed 5 years ago

sivafirst commented 5 years ago

When using CosmosPartitionKey attribute on integer type throws exception during upsert. But works fine when the type is string. Not sure if it is an issue in cosmonaut!

Exception: Microsoft.Azure.Documents.DocumentClientException : Message: {"Errors":["PartitionKey extracted from document doesn't match the one specified in the header"]}

Elfocrash commented 5 years ago

Your partition key cannot be an integer. CosmosDB only accepts string partition keys.