RestKit 2.0 : Mapping - second entitiy nil when not unique

前端 未结 1 1896
忘了有多久
忘了有多久 2020-12-07 06:38

I am trying to map an array of \'Comments\' to a Comment entity that has a sub-entity \'testUser\', the person who wrote the comment. Everything is mapping fine as long as t

相关标签:
1条回答
  • 2020-12-07 07:02

    You haven't shown mappings, and I'm assuming that you have a to-many relationship to support what you're trying to do.

    When you create the relationship mapping you need to set the assignmentPolicy property to RKUnionAssignmentPolicy. The default policy replaces any existing connection with the new one. This policy will merge the connections instead.

    0 讨论(0)
提交回复
热议问题