Imagine a bug tracker.
Each ticket contains a lot of data. Now the status of a few tickets from a long list of tickets is updated.
App.Ticket = DS.Model.extend({
id: DS.attr('number'),
status: DS.attr('string'),
...
});
Currently when invoking save
in ember-data this would send the complete models to the server.
What can I do to only send a partial update, like [{"id": 1, "status": "closed"}, {...}]
?
PS: I understand that this is not possible right now, so I'm wondering if there is a workaround / modification that would enable this? (a general-purpose solution is not required).
My current workaround is to specify a readOnly
option that excludes the attributes that I don't want to be sent in the POST.
Details can be found here: https://github.com/emberjs/data/pull/303#issuecomment-13993905
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With