ios - MagicalRecord with primaryRelationshipKey -
i have entity userprofile attribute uid. receive users web , add in core data. want if there user id in base - replaced. use tip https://github.com/magicalpanda/magicalrecord/wiki/general-tips how can set want use primary key?
you need first fetch request , check if there userprofile uid.
if there is, update userprofile , save.
if not, create new userprofile , save.
Comments
Post a Comment