ios - Magical Record import with already existing data -


i'm trying use magical record import data coredata db.

i'm working on entity person @ moment.

a person has firstname, lastname, personid attributes. (i know don't need idstring, i'm not using internally, used talk server).

anyway, if have person...

firstname - john lastname - smith personid - 1 

and download json...

[     {         firstname: john,         lastname: doe,         id: 1     },     {         firstname: michael,         lastname: caine,         id: 2     },     {         firstname: angelina,         lastname: jolie,         id: 3     } ] 

i'd want import add michael , angelina , update john smith john doe because exists same id vs personid.

i've set mappedkeyname between id , personid.

is possible this? i've been reading blog... http://www.cimgf.com/2012/05/29/importing-data-made-easy/ automatic mapping of key names etc... , wondered if exploit want?

i have read part relatedbyattribute blog i'm not sure should setting , to?

should set on entity person? or attribute personid? , should set to? "id"? or else?

i'm not sure if you're using relatedbyattribute setting in userinfo area of core data model. don't mention in issue here. suggest double check that. , clarify, it's called relatedbyattribute because string put value section coredata attribute relates entities, no json (or other object) data. so, check 2 things , if there still problem, please open ticket on github, preferably unit test helps describe problem.


Comments