I'm trying to connect a many-to-many relationship with RestKit.
Suppose we have 2 entities:
User, returned by /user/:login_name:
{
id: 1234,
name: 'Joe Bloggs',
...
}
and Group, returned by /user/:login_name/groups:
[
{
id: 2345,
name: 'Diggers',
...
},
{ id: 2346,
name: 'Fillers',
...
},
...
]
Each user can belong to several groups and each group can have several users.
My Core Data models reflect the data returned by API plus have User.groups and Group.users relationships.
The problem is no foreign keys are returned by API: there's neither User.groups nor Group.users collection. So, as far as I understand, I can not use RKConnectionDescription in this case?
It looks like [RKRoute routeWithRelationshipName:objectClass:pathPattern:method:] could have been used, but I'm not using object mapping and it looks like routing can't be used with entity mapping.
Am I missing something here?