Mongoデータベースを管理しようとしているCoreDataでRestKitを使用しています。Rest Service が受け取る JSON は次のようになります。
{
"_id": {
"$id": "511bc374a8af9ba27b597633"
},
"name": "javi",
"email": "javi@email123",
"passwordSHA1": 1234,
"nationality": "Brasil",
"gender": 0,
"borndate": 1360686828,
"filephoto_id": 1234567,
"pi_selected": 1,
"profile_interest": [{
"name": "perfil prueba1",
"tourism": ["Cinemas", "Concerts"],
"leisure": ["NightLife", "Bars"],
"foodtype": ["African", "American"]
}, {
"name": "perfil prueba2",
"tourism": ["Theathers", "Concerts"],
"leisure": ["NightLife", "Bars"],
"foodtype": ["African", "American"]
}],
"accesibility": ["Blind", "Deaf"],
"plans": [{
"name": "plan prueba 1",
"location_ids": [10001, 10002, 10003]
}, {
"name": "plan prueba 2",
"locations_ids": [10002, 10003, 10004]
}]
}
2 つの質問があります。
Coredata でこの情報を管理するにはどうすればよいですか (また、これを説明するチュートリアルを知っている場合)。今では、残りのサービスを呼び出すときに「ユーザー」テーブルのみを埋めることができます (プロファイルの関心、アクセシビリティ、および計画ではありません) が、同じ呼び出しで他のテーブルを埋めたいと思います。
「User」テーブルに属性「id」を追加してもよいですか? (上記の JSON を受け取った場合、マッピング プロバイダーでどのように取得できますか?