Open aandis opened 5 years ago
Given
// app/models/person.js export default Model.extend({ name: attr('string'), addresses : fragmentArray('address'), }); // app/models/address.js export default Fragment.extend({ street : attr('string'), country : attr('string') });
If person looks like -
person
{ "name": "John", "addresses": [ { "street": "test", "country": "test" } ] }
and I delete the address object from person in my app with
address
this.get('model').get('addresses').removeAt(0)
and try to save the model, the json posted is -
{ "name": "John" }
I would expect the following json to be posted -
{ "name": "John", "addresses": [] }
Is this expected behavior?
ember-data-model-fragments@3.3.0 ember-data@3.4.4
ping.
hello @aandis I don't think the behavior has been explicitly defined but I would accept a PR to fix it.
Given
If
person
looks like -and I delete the
address
object fromperson
in my app withand try to save the model, the json posted is -
I would expect the following json to be posted -
Is this expected behavior?