-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Saving a record immediately after unloading a record with the same id fails #5125
Comments
kaeufl
added a commit
to kaeufl/data
that referenced
this issue
Aug 14, 2017
Just as #4942 this issue is probably caused by #4821. This PR is has given me hours of headaches. 😢 The hack described in #4972 (comment) works for now. |
stefanpenner
added a commit
that referenced
this issue
Aug 16, 2017
Failing test for #5125 and attempted fix
stefanpenner
pushed a commit
that referenced
this issue
Aug 16, 2017
stefanpenner
pushed a commit
that referenced
this issue
Aug 16, 2017
#5126 is merged, will get a release out soon (aiming for tomorrow) |
stefanpenner
added a commit
that referenced
this issue
Aug 24, 2017
{Backport release} [BUGFIX release] Failing test for #5125 and attempted fix
stefanpenner
added a commit
that referenced
this issue
Aug 24, 2017
{Backport beta} [BUGFIX beta] Failing test for #5125 and attempted fix
@stefanpenner When will the new release be released? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given a record in the store with type 'person' and id 'person-1', the following currently fails with ember data >= 2.13:
store.peekRecord('person', 'person-1').unloadRecord();
store.createRecord('person').save();
If the backend returns a payload that again contains the id 'person-1', the save operation fails with the error:
You cannot update the id index of an InternalModel once set. Attempted to update person-1
We run into this issue in an appplication where we can end up with a record being pushed to the store via a websocket push notification before the HTTP POST request initiated by the save operation has returned. We used to workaround this situation by unloading the record in the adapter's createRecord() hook before returning the payload to the store. This has worked until ember data 2.12. This issue thus currently keeps us from upgrading.
Potentially related issues: #5041, #4972, #5006, #4972
The text was updated successfully, but these errors were encountered: