I seem to have a recurring problem when i'm trying to store data using ember.
When i clear my localforage (Chrome Dev Tools -> tab Application) and reload my application, I create a series of request to my API and with the results of those API calls I create and store them in my localstorage.
Oftentimes, right after i cleared my storage i get the following warning:
Ember Data expected to find records with the following ids in the adapter response but they were missing: [1,2]
After that, I get an error
Assertion Failed: The id 1 has already been used with another record for modelClass ocularium-frontend@model:application-settings:
this happens when I try to save my result using (storeKey.type = "application-settings" and data = result data from API call).
this.store.createRecord(request.storeKey.type, data).save()
This should never happens since I've cleared my storage and did a refresh. He finds data that's there but actually not there. When all my data is saved, the new data "application-settings" is still not there.
Is there a way to fix this? I tried catching it and storing it again. Tried to 'update' it and storing it again, didn't work.
Aucun commentaire:
Enregistrer un commentaire