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

Please add more documentation to Model reload #9613

Open
mhankus opened this issue Dec 3, 2024 · 1 comment
Open

Please add more documentation to Model reload #9613

mhankus opened this issue Dec 3, 2024 · 1 comment

Comments

@mhankus
Copy link
Contributor

mhankus commented Dec 3, 2024

Description

Currently docs for Model.reload does not specify how reload works when object is dirty (hasDirtyAttributes returns true). I was sure that reload was discarding all changes made to record, and load fresh state from server. Right now I see that changes need to be rolledback. Please add clarification to documentation what happens in that case.

Versions

Run the following command and paste the output below: pnpm list ember-source && pnpm list ember-cli && pnpm list "*ember-data*".

@runspired
Copy link
Contributor

correct, reload will update remote state only. It will not discard any mutations you've made. I'm not sure its worth adjusting documentation as this API is scheduled for deprecation and model.reload works the same as any other request in this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: needs triage
Development

No branches or pull requests

2 participants