Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad request when adding a child to a parent and child has no reference to parent #60

Open
abstratt opened this issue Dec 21, 2017 · 1 comment

Comments

@abstratt
Copy link
Owner

abstratt commented Dec 21, 2017

Note the undefined link to parent. Note also the request was made without a parent as context:

POST http://localhost/services/api-v2/demo-cloudfier-apps-auto-crm/entities/autocrm.Oportunidade/instances/

{
  "values":{
    "data":"2017-12-21",
    "interesse":"Venda"
  },
  "links":{
    "undefined":{
      "objectId":"1",
      "typeRef":{
        "entityNamespace":"autocrm",
        "kind":"Entity",
        "typeName":"Contato",
        "fullName":"autocrm.Contato"
      }
    }
  },
  "typeRef":{
    "entityNamespace":"autocrm",
    "typeName":"Oportunidade"
  }
}
@abstratt
Copy link
Owner Author

Caused by the use of an inlined composition. Since only the parent->child role is named, the child->parent role gets no name, causing havoc. Workaround was to declare a top-level composition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant