0
我想从API中获得以下响应来定义Ember数据模型。我在定义num_activity_per_map字段时遇到了问题,因为它是JSON对象的数组,但是它们没有ID。如果我使用DS.hasMany('activityPerDate',{async:true})抱怨它没有主键。Ember数据:映射阵列
{
"stats": {
"num_users": 44,
"num_activity_per_date": [
{
"date": "04-10-2015",
"count": 6
},
{
"date": "05-10-2015",
"count": 8
},
{
"date": "06-10-2015",
"count": 7
},
{
"date": "07-10-2015",
"count": 5
},
{
"date": "08-10-2015",
"count": 3
}
],
}
}