-
-
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
null model is stored in cache #4346
Comments
I am wondering though why there is no assertion for |
Yes, @pangratz narrows down the issue better than my example. |
…d and the id was not already provided by the client Closes emberjs#4346
…d and the id was not already provided by the client Closes emberjs#4346
So I am encountering this issue when using
DS.RESTAdapter
and getting an empty JSON object response when callingDS.Model#save()
. The API returns an empty object and as expected nothing is stored in the store. However this happens:The desired outcome would be for both to evaluate to
0
.When I inspect on the object stored in the cache, every field is
null
. So even callingunclearRecord
does not work. CallingunclearAll('user')
does actually remove the cached object, but I don't think this should ever get into this state. I thinkpeekAll
should return no objects or there should be an error thrown when the adapter tries to parse a response with noid
.I created an example project that shows the behavior: https://github.com/trevorrjohn/bad-cached-data
Thanks!
The text was updated successfully, but these errors were encountered: