Question

I'm using Restkit 0.22 with Core data, this is my schema:

----------           --------
| itemA  |           | itemB |
----------           ---------
| itemsB | 1 --- > N | itemA |
----------           ---------

this is one to many relationship. I load all the itemA items from local JSON file.

and i want to make a call to my web service and get itemB items and the result of each call I want to add to a specific existing itemA.

in the response of itemB items there is not id or foreign key that indicates that those items belong to the specific item that I want to add them to.

how can i achieve/map it?

Était-ce utile?

La solution

Based on the current information, RestKit can't help you as there is no easily accessible identification information (the URL query parameter can't be easily accessed).

So, your main option currently is to simply iterate the mapping result contents and associate the results with the itemA object that you used to make the request manually and then save the context.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top