-
-
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
Support for natural key's #5237
Comments
Hi @erichonkanen. This seems like a bug and it is something Ember Data should support. |
@bmac thanks for the input, I'm not entirely familiar with the intimate details of ember-data but do you think a work-around is possible? also where in the code would a new feature for this target? I'd be interested to get more familiar and possibly contribute |
This looks like a duplicate of the |
@hjdivad @workmanw I just reverted our app to |
related: #4972 |
related: #5006 |
Closing this in favor of #1829 |
Running into this again in 2021 w/ember-data 3.20.5. It seems like using composite natural keys causes problems, particularly when creating/deleting/recreating a record with the same key (id) via websocket updates. When a record is deleted via "record.destroyRecord()", and then later created again via "store.pushPayload(**recordData)", a new attempt to delete via "record.destroyRecord()" will throw with |
Hello,
We've run into an issue with a model that uses a natural key for the
id
.The issue can be summed up as:
If a record is created, then deleted, then a new record created with same natural key as previously deleted record, we get error.
Assertion Failed: 'natural-key-model' was saved to the server, but the response returned the new id 'foo|bar', which has already been used with another record.
(ember-data 2.17.0-beta.1)It seems like the ember-data store is retaining a reference to the supposedly deleted record which prevents a new one from being created.
It is explained more here
Does ember-data support natural key's or is it something ever talked about? Or, am I off and the issue from above link is unrelated to natural key?
Thanks
The text was updated successfully, but these errors were encountered: