RestKit: Can pathPattern have multiple IDs (Object Attributes + Object Relationship Attributes)

45 Views Asked by At

I have nested resource endpoints like /users/:userID/profiles/:profileID from my backend.

In my data model i have the same relationships setup as following: User -- has-many -- profiles. So is there any way i could setup my router to fetch object attributes from the original object's (say a user) relationship. I have the proper relationships setup as well as inverse relationships.

At the end i want to use it like this:

[allRoutes addObject:[RKRoute routeWithClass:[Profile class] pathPattern:@"/users/:userID/profiles/:profileID/set_inactive" method:RKRequestMethodPOST]];
0

There are 0 best solutions below