Saving record, only certain attributes


#1

I’m working with a view in which there are two forms both backed by the same record instance. When one of the forms is submitted, save is called on the that model to send the changes up to the server. The problem is that save always sends all attributes up to the server. So if a user edits some of the attributes in Form A, but then makes some edits in Form B and actually submits that form, the edits from both forms will be saved.

Is there a way to save an Ember Data record but be selective about which attributes are sent to the server? Or will I need to fall back to Ajax for this use case?


#2

Is there a way to save an Ember Data record but be selective about which attributes are sent to the server? Or will I need to fall back to Ajax for this use case?

I’m just adding my two cents here, but this is one of the reason’s Ember Data is so silly. How is only wanting to save a couple of attributes a “use case”? Only wanting to save certain attributes should have been the expected norm.


#3

It’s not silly, this is the way it works, you are allowed to customise it :smiley:

Please check this toptic.