microsoft / spring-data-cosmosdb

Access data with Azure Cosmos DB
MIT License
94 stars 64 forks source link

Support partition key on nested object #350

Closed christopheranderson closed 4 years ago

christopheranderson commented 5 years ago

It is possible in Cosmos DB to set the partition key on a sub-object like so:

{
    "path": {
        "to": {
            "partitionKey": "foo"
        }
    }
}

where the paths would be ["/path/to/partitionKey"] in the collection settings.

In spring-data-cosmosdb, it appears you can only set it on the root object.

Ideally, we could support setting it on a leaf node as in the above sample.

Incarnation-p-lee commented 5 years ago

Thanks for issue this. For now we only support at most one partitionKey from root Object.

kushagraThapar commented 4 years ago

Closing it here as this is being tracked in a separate repo.