Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the return value of DS.Adapter#updateRecord #3713

Merged
merged 1 commit into from
Oct 12, 2015

Conversation

bmac
Copy link
Member

@bmac bmac commented Aug 27, 2015

Closes #3712

@@ -330,6 +330,14 @@ var Adapter = Ember.Object.extend({

Serializes the record update and sends it to the server.

The updateRecord method is expected to return a promise that will
resolve with the serialized record. This allows the backend to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, it's actually worked for me with pre serialized data instead of serialized data (the raw object before normalizing the model by serializer)? am i did something wrong or is it mistake in the docs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct. Maybe I'm using the wrong terminology. I think of the raw object before normalizing the model by serializer as the "serialized data" and the json object after it has been run through normalizeResponse to be the "normalized data".

@oriSomething
Copy link
Contributor

also it seems relations are not effected from the process... again i'm not sure it's me or maybe it's undocumented stuff

@bmac
Copy link
Member Author

bmac commented Oct 12, 2015

@oriSomething. Relationships can be effected by this process if the backend supports sideloading in its serialized payload.

For example with json API any relationships returned by the backend in the included property would also be updated in the store.

@bmac bmac force-pushed the document-updateRecord branch from 5104843 to 4e79b27 Compare October 12, 2015 14:25
bmac added a commit that referenced this pull request Oct 12, 2015
Document the return value of DS.Adapter#updateRecord
@bmac bmac merged commit e12c2bc into emberjs:master Oct 12, 2015
@bmac bmac deleted the document-updateRecord branch October 12, 2015 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants