Skip to content

Read an item section is incredibly misleading #25753

Open

Description

This page states that to read a single item you provide the id to the item class:
await container.item("1").read();
And yet, after many hours of my life, I stumbled upon this issues thread:
##9788
In which southpolesteve kindly points out that you should in fact use item(id, id) if the id is the partition key. When creating a container in the portal it is a requirement to add a partition key, so I believe this is a mandate? If not, please, please, please, update this documentation to reflect that you may need to add the id twice. I beg of you. Save future developers this pain.

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

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

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.CosmosDocsbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

  • Status

    In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions