Skip to content

Conversation

@kushagraThapar
Copy link
Contributor

Non partitioned container migration sample


// To read an existing document which doesn't have any partition key associated with it,
// read it using PartitionKey.NONE
CosmosItemResponse<JsonNode> cosmosItemResponse = cosmosContainer.readItem("itemId", PartitionKey.NONE, JsonNode.class);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mean the item is created with PartitionKey.None?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means the item was not created with any partition key, since when it was created, this container didn't have any partition key.

Copy link

@xinlian12 xinlian12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@kushagraThapar kushagraThapar merged commit e1c7d07 into main Jul 12, 2022
Copy link
Contributor

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants