You have a OrderComponent which hasOne SKU.
You have a SKU which hasMany OrderComponents.
If your mapping is:
> [orderComponentObjectMapping hasOne:@"sku"
> withMapping:skuObjectMapping];
> [orderComponentObjectMapping connectRelationship:@"sku"
> withObjectForPrimaryKeyAttribute:@"skuID"];
And your Core Data Entity has OrderComponent.SKU -> SKU (singular) and
SKU.OrderComponents => OrderComponent.SKU (has many)
When you create an orderComponent object via Restkit, it'll create the object in the Core Data Store with orderComponent pointing to a NULL SKU. Though that orderComponent would intact have orderComponent.SkuID as a valid FK to a nonexistent SKU object.
It seems like if you are going to do #2, you have to do a secondary check (after all orderComponents are created) for any orderComponents w/ a null SKU. Then see if a SKU with that SkuID exists. And if so, set orderComponent.sku = [Sku objectWithId: SkuID]
to create that relationship "afterward" by hand. If Restkit has a way to handle such automatically (and it may) I've not come across it. I think there's a branch or someone who's done some work with "syncing", you might want to search the google group. Their work may include something that would catch such a relationship setup and update it for you.
Shane