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

Updating record & related records simultaneously does not clean related records. #2143

Closed
danfinlay opened this issue Jul 31, 2014 · 5 comments

Comments

@danfinlay
Copy link

Hi, using ember-data beta 8,

I have a model that I want to save some related models with at the same time.

I'm currently serializing those objects on the model in a way my server is respecting, but when the response comes back, no matter what 200 or 202 status code I send back, only the main model (the one who the PUT url belonged to) is set to clean. All the related and updated models are left dirty, even when I'm including those updated records in the response.

What is the correct way to tell Ember to check if a response has cleaned some records?

@bmac
Copy link
Member

bmac commented Jan 15, 2015

@igorT Does ember data currently support this functionality?

@wecc
Copy link
Contributor

wecc commented Sep 16, 2015

I don't think this is supported. If models are uncommitted and new data is pushed to the store nothing will change except the canonical data for that model. A rollback would discard the changes and make the (updated) canonical data current.

@wecc
Copy link
Contributor

wecc commented Sep 16, 2015

Related: #2786

@sandstrom
Copy link
Contributor

Possibly the same as this: #1829
(I'm guessing that “Saving related models at the same time” refers to embedded records)

@runspired
Copy link
Contributor

closing in favor of:

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

No branches or pull requests

5 participants