2

How to update hasMany associations in record?

I tried this approach:

record.get('childrenRecords').clear();
newChildrenRecords.forEach(function (child) {
  record.get('childrenRecords').pushObject(App.ChildModel.find(child.get('id'));
});

But I got error:

Uncaught Error: <DS.ManyArrayStateManager:ember3557> could not respond to event recordWasAdded in state loading.

Also I can't find right solution how to update hasMany associations in Ember.data docs.

Wojciech Bednarski
  • 6,033
  • 9
  • 49
  • 73
Andrii
  • 46
  • 3

0 Answers0