Skip to main content
Answer

FDM- Unable to create Uniqueness constraint

  • March 23, 2023
  • 3 replies
  • 61 views

Hi Team, 

 

I am trying to use uniqueness constraint in model using Cognite UI - 

type EntityNew @container(indexes: [{identifier : "entityTypeIndex", fields : ["id"]}], constraints : [{identifier:"id",constraintType:UNIQUENESS,fields:["id"]}]){

  id: String!

  name: String!

  dept: Department

}

 

type Department{

  name: String

}


I am getting error - invalid: 400 Bad Request. Text: "{ "error": { "code": 400, "message": "Missing required field: constraintType" } }" I also tried using GraphQL API and facing same issue. Can you please help.

Best answer by Snehal-Jagtap

Thanks Jason!!

3 replies

Forum|alt.badge.img
  • Seasoned Practitioner
  • March 23, 2023

Snehal,
A ticket has been created to address resolution of this issue.  We will update you once resolved.

Regards,
Jason


  • Author
  • Seasoned
  • Answer
  • March 24, 2023

Thanks Jason!!


Forum|alt.badge.img
  • Seasoned Practitioner
  • April 5, 2023

This issue has been resolved.