2

如何更新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

4

0 回答 0