You are using a RESTadapter ... When you save, do you want to serialize all the nested relationships?
When you save or update your write skip in the hash setting of the toJSON method with
{associations: true}
Take a look at the unit tests on ember-data for examples: https://github.com/emberjs/data/blob/master/packages/ember-data/tests/unit/to_json_test.js
deepEqual(record.toJSON({ associations: true }), { id: 1, name: "Chad", phone_numbers: [{ id: 7, number: '123' }, { id: 8, number: '345' }, { id: 9, number: '789' } ]}, "association is updated after editing associations array"); });
Hope this helps.
source share