現在、オブジェクトのグループをサーバーに送信する必要があるインスタンスがいくつかあります。
{
"things": [
{
//object stuff
},
{
//object stuff
},
...
]
}
だから私がやっていることは、中間オブジェクトを定義することですMyThingPayload
@interface MyThingPayload
@property (nonatomic, strong) NSArray *things;
@end
そして、マッピングするとき
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:NSClassFromString(@"MyThingPayload")];
[mapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"things"
toKeyPath:@"things"
withMapping:[self entityMappingForManagedThingObject]]];
不必要なオーバーヘッドのようです。配列を保持する中間オブジェクトなしでこれを行う方法はありますか?