如何更新hasMany
记录中的关联?
我尝试了这种方法:
record.get('childrenRecords').clear();
newChildrenRecords.forEach(function (child) {
record.get('childrenRecords').pushObject(App.ChildModel.find(child.get('id'));
});
但我得到了错误:
Uncaught Error: <DS.ManyArrayStateManager:ember3557> could not respond to event recordWasAdded in state loading.
我也找不到正确的解决方案如何更新文档hasMany
中的关联。Ember.data