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
Describe the bug
If you use a numerical partition key, you will not be able to find the document on a read where you specify the partition key or do a partial document update, which includes the partition key.
Pointed my application at the emulator and started running into problems. It can do a normal save (upsert) just fine. But the find and patch won't work.
Narrowed it down to the fact that our model's partition key is a BigInteger. Tried int and long, but it was still failing to findById (point read) or patch anything, both of which require you to supply the partition key. Then I changed it to a String, and it had no issues. Otherwise, it cannot find the document you are looking for by that partition key.
And then feed in the age value instead of the name when dumping in a new PartitionKey() in both cases, you run into it
Expected behavior
Might have missed this when looking the unsupported feature list, but it should be able to support numeric partition keys like it does in the cloud.
Describe the bug
If you use a numerical partition key, you will not be able to find the document on a read where you specify the partition key or do a partial document update, which includes the partition key.
Pointed my application at the emulator and started running into problems. It can do a normal save (upsert) just fine. But the find and patch won't work.
Narrowed it down to the fact that our model's partition key is a
BigInteger
. Triedint
andlong
, but it was still failing to findById (point read) or patch anything, both of which require you to supply the partition key. Then I changed it to aString
, and it had no issues. Otherwise, it cannot find the document you are looking for by that partition key.Confirmed copying over this gentleman's test code into a Spring Boot project (assume it has nothing to do with Spring Boot): https://github.com/bitxon/java-cosmos-emulator-vnext-experiment
To Reproduce
If you change the partition key to
/age
And then feed in the age value instead of the name when dumping in a
new PartitionKey()
in both cases, you run into itExpected behavior
Might have missed this when looking the unsupported feature list, but it should be able to support numeric partition keys like it does in the cloud.
Desktop:
com.azure.spring:spring-cloud-azure-dependencies:5.21.0
org.springframework.boot:spring-boot-starter-parent:3.4.2
org.springframework.cloud: spring-cloud-dependencies:2024.0.0
com.azure.spring spring-cloud-azure-starter-data-cosmos
The text was updated successfully, but these errors were encountered: