I have an entity called Card
that has it's properties.
The other entity is a Slide
entity. And it has a one-to-one relation to Card
.
There is no mention of Slide
in the JSON that i receive for Card
, but in the JSON for a Slide
there is a "cardID" value that is equal to ID of the Card
entity.
Here is the Card mapping:
@"cardID" : @"cardId",
@"cardTexts" : @"texts",
And a Slide mapping:
@"imageID" : @"imageId",
@"cardID" : @"cardId",
And that is JSON for Slide entities:
[
{"imageID":1619,"cardID":4922},
{"imageID":1619,"cardID":1332},
etc
]
I don't understand how to make a proper relation. Tried to make something like:
[slideMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"cardId" toKeyPath:@"card" withMapping: cardMapping]];
But it doesn't seem to work. Please point out my mistake