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
shouldBackgroundReloadRecord is background reloading unsaved records #3678
Comments
I'm seeing this issue with non-background reloading (I have This seems like a clear bug — if someone from ember data can give me any guidance about where to dig into this, I can try to learn enough about the architecture to submit a failing test PR or maybe a fix. @bmac maybe? |
As an update, the error I see reads like this:
|
Hi @decasia. Feel free to ping me on the ember community slack. I think a good place to start debugging this would be adding a breakpoint to the store's scheduleFetch to try to figure out where/why Ember Data is initiating the request for a record in the |
@mcrummey looking at the code you posted, it seems that you are transitioning to the Did you have time to dig into this more with the hint @bmac suggested? |
@mcrummey If you already have access to the new record you should be able to pass the record to the transition to bypass the
That said, having client side IDs with new records should probably not default to true in |
@wecc Passing the object works and it does not trigger shouldBackgroundReloadRecord(). |
This is a bug. I am working on a fix. |
This was resolved by the above PR, but we forgot to close it. Closing now :) |
When a record is created and we transition to that route, Ember data does a background reload that results in a 404 from the database and the exception.
In order to inhibit the background reload we put a "isNew" check into our adapter.
I can't think of a use case where ember data would want to do a background reload on records that are not saved.
Ember data should inhibit background reloading by default for unsaved records.
The text was updated successfully, but these errors were encountered: