[Support] How to import values into a related entity #413

squarefrog opened this Issue Feb 13, 2013 · 1 comment

1 participant


I'm using a web service which returns results like the following example:


My Core Data schema looks like this:

Using MagicalRecord's MR_importValuesForKeysWithObject method, how would I set about mapping the meals key to the related Meals.name attribute? I can do it manually, but is there a way to avoid this?


Received an answer to this on Stack Overflow.

Basically all you have to do is override the importMeals: method in the Person object. It takes an id object as an argument and forwards over your original object.

@squarefrog squarefrog closed this Feb 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment