I am integrating with an api that exposes child resources nested under parent resources.
This seems to work fine when I am finding or creating resources from JSData, however, updates and deletes seem to want to access the resource directly.
GET & POST:
/api/parents/:parent_id/children
But, with delete and put requests:
DELETE & PUT
/api/children/:child_id
It seems like if there is a object id involved for the child record then the url that is constructed is constructed at the base level of the API, and if there is no object id, as is the case with POST and GET (findAll).
Is there something very obvious that I am missing here?
After reading a bit more about relations in JS-Data here: http://www.js-data.io/docs/relations
I saw this part,
under the "Defining Relations" header. I had two relations with the
parent: true
configuration which I think confused JS-Data's router.