core data - How can I update the attributeMappings for RKObjectMapping -


because have core data objects same domain objects coming server using following code automatically setup mapping:

rkobjectmapping *mapping = [rkentitymapping mappingforentityforname:entityclassname inmanagedobjectstore:managedobjectstore];  // list of attributes nsentitydescription* entityinfo = [nsentitydescription entityforname:entityclassname inmanagedobjectcontext:managedobjectcontext];  [mapping addattributemappingsfromarray:[[entityinfo attributesbyname] allkeys]]; 

later, because there 1 attribute specific need update mapping.attributemappings array. can not remove/clear old array read only. there official way how update array?

no, create new mapping (and different response descriptor such switch between them without changing configuration of object manager).

technically, subclass rkobjectmapping, or add category it, , modify mutablepropertymappings achieve goal.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -