Giter Club home page Giter Club logo

Comments (4)

barryajones avatar barryajones commented on May 17, 2024 2

@PrimeObjects If your partition key is organizationId then you should pass it to the read method like so:

await container.item(id).read({partitionKey:['/organizationId']});

from azure-cosmos-js.

PrimeObjects avatar PrimeObjects commented on May 17, 2024

When I used await container.item(id).read(); I got error "The partition key supplied in x-ms-partitionkey header has fewer components than defined in the the collection",

then I changed to await container.item(id).read({partitionKey:[]}), it only returns document that has no value in organizationId field.

I do have a particialKey which is /organizationId
When I use await container.item(id).read({partitionKey:'/organizationId'}); it always say Not Found.

Please help!
Thanks lot!
Gary

from azure-cosmos-js.

mybouhssina avatar mybouhssina commented on May 17, 2024

@barryajones do you mean that we have to pass the value or the path of the paritionKey ?
what if we don't want to pass the partition key and find only by id ?

from azure-cosmos-js.

christopheranderson avatar christopheranderson commented on May 17, 2024

Covered by NP->P changes. All samples will be partitioned. (Any semi-off topic conversations should move to new issues).

from azure-cosmos-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.