question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation: Is ParitionKey required for GetItemLinqQueryable call?

See original GitHub issue

Is your feature request related to a problem? Please describe. I would like some documentation clarifying whether or not a partition key is required when using GetItemLinqQueryable in order for the query to be scoped to a single partition.

An example is when the LINQ used with GetItemLinqQueryable includes a .Where(i => i.Pk == "Car"); where .Pk is the partition key path of the container and "Car" scopes the query to a single partition.

In this case, do I need to specify the new PartitionKey("Car") in the request options passed to GetItemLinqQueryable?

Describe the solution you’d like Either in the repository samples or on docs.microsoft.com, some examples showing if/when the partition key is inferred from usage in a LINQ query.

Describe alternatives you’ve considered Currently I’m specifying the partition key value explicitly in every GetItemLinqQueryable as opposed to using a .Where() call.

Additional context n/a

Thanks 😊!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
azzimuthcommented, May 18, 2021
0reactions
j82wcommented, May 18, 2021

@azzimuth can you open a new issue with full exception message including the stack trace. Also provide a sample or a way to reproduce the issue if possible. The SDK should not be throwing a NullPointerException, and it should be considered a bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cosmos GetItemLinqQueryable with ItemResponse without ...
A ReadItem operation is reading an item by it's id property and Partition Key Value. When querying without the Partition Key, you are...
Read more >
Query items in Azure Cosmos DB for NoSQL using .NET
To query items in a container, call one of the following methods: GetItemQueryIterator<>; GetItemLinqQueryable<> ...
Read more >
A repository wrapper around Azure Cosmos DB - AlignedDev
A repository wrapper for Azure Cosmos DB queries and commands. I recently upgraded the deprecated package Microsoft.Azure.DocumentDB.
Read more >
Query Document using LINQ on Azure Cosmos DB
In this article I will teach you how can you make LINQ queries as well as SQL queries to fetch documents from Cosmos...
Read more >
Azure Cosmos DB Basics
Partition Key is about how Cosmos DB stores the physical multiple documents together based on the partition key you define that is common ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found