开发者

Question to mapKeyPath

开发者 https://www.devze.com 2023-04-06 23:44 出处:网络
I am following the Restkit Tutoria开发者_运维技巧l on https://github.com/RestKit/RestKit/blob/master/Docs/Object%20Mapping.md and this is pretty good because RestKit is a really cool framework - I thi

I am following the Restkit Tutoria开发者_运维技巧l on https://github.com/RestKit/RestKit/blob/master/Docs/Object%20Mapping.md and this is pretty good because RestKit is a really cool framework - I think.

There is just one point I don't get. In the documentation is a line with "article" but I cannot see where article is declared and where it comes from.

// Define the relationship mapping [article mapKeyPath:@"author"
toRelationship:@"author" withMapping:authorMapping];

Can someone give some light into the darkness?

Is this the right area on how to handle 1:n relationships that are nested?


The line should be:

[articleMapping mapKeyPath:@"author" toRelationship:@"author" withMapping:authorMapping];

The updated article on the wiki has the correction.

0

精彩评论

暂无评论...
验证码 换一张
取 消