RestKit Core Data mapping connection with foreign key in the URL

陌路散爱 提交于 2019-12-08 20:58:35

You can use the foreign key as described in the reference you link, you just need to get it...

To get it, you need to use a path pattern and metadata mapping. You also want to use RKRoute as it does a lot of the work with path patterns.

Define your path pattern like:

projects/:identity/members

And then in your mapping you can define the foreign key to pick this up:

@"@metadata.routing.parameters.identity": @"foreignKey",

See the 'Metadata Mapping' section of the RKObjectManager docs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!