Azure/data-api-builder

"The 'kind' value 'MultiHash' specified in the partition key definition is invalid. Please choose 'Hash' partition type."

Open

#1733 aperta il 20 set 2023

Vedi su GitHub
 (8 commenti) (0 reazioni) (2 assegnatari)C# (348 fork)auto 404
cosmosenginehacktoberfestknown-issue

Metriche repository

Star
 (1459 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Hi there! I'm using DAB to query a CosmosDB NoSQL container with partition keys of:

id: ID
/TenantId: String
/EntityType: String
/EntityId: String

Example: image

The items within this table have been assigned the model of "Location"

I am trying to create an item using the "createLocation" function generated by DAB, with a mutation such as the below:

mutation{
  createLocation(item:{
    TenantId: "1",
    EntityType: "FromDAB",
    EntityId: "1",
    Address: "HelloGitHub"
  }) {
    TenantId
    EntityType
    EntityId
    Address
  }
}

However I get a 404 message with the error:

The 'kind' value 'MultiHash' specified in the partition key definition is invalid. Please choose 'Hash' partition type.

Please could you let me know how I can use the "createLocation" mutation correctly to create an item within my database?

Thanks!

Rich

Guida contributor