Mapeo dinámico RestKit [cerrado]

I need to map this data into one Core Data object (EventList).

{
 "eventList":[
  {
     "code":"hhel444440lhxxxxxn",
     "name":"Test Event",
     "id":"222495710159sdfdfd8000000",
     "status":"Open",
     "urls":[
        {
           "hostURL":"mything.association.somedomain.com",
           "module":"association",
        },
        {
           "hostURL":"mything.mobile.somedomain.com",
           "module":"mobile",
        }
     ]
  }
 ]
}

====== I need it mapped to these attributes on my class ===========

@dynamic code;
@dynamic name;
@dynamic id;
@dynamic status;
@dynamic hostURL;

The hostURL should only be mapped if the value for module == mobile so in this case we don't want the url from the first of the urls where module == association. We need to skip the first one.

I am trying to use DynamicMapping, but when I try dynamic mapping I am getting:

valueForUndefinedKey:]: the entity (null) is not key value coding-compliant for the key "hostURL".'

preguntado el 22 de mayo de 12 a las 20:05

1 Respuestas

Got it. I was cutting and pasting from other code I had written in missed changes.

contestado el 31 de mayo de 12 a las 21:05

Can you please share your mapping code ? that could be helpfull ! - Vassily

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.