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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -