-
-
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
unloadAll destroys records and an assertion fails in flushCanonical #2982
Comments
I tried to build a test case (I wanted to submit a PR), but I haven't been able to reproduce the problem without creating and destroying an entire application... I prepared a branch from my project where the issue reproduces with a minimal set of data.
In file In the model I'm using a hasMany relationship that is async and polymorphic. If the records (not the definition in the model) lose that piece of data, the tests pass even without the workaround I currently have. |
Hi, thanks for reporting the issue. I am having trouble running your test case, when I do ember serve in the repo after npm&bower install I get
|
Sorry about that, I just fixed the branch.
Probably not relevant, but I'll mention that the data is being preloaded from an initializer: https://github.com/givanse/mvc-tree/blob/test-case/app/initializers/preload-data.js |
The test http://localhost:4200/tests?nocontainer&hidepassed&module=Acceptance%3A%20Index |
I encountered an error when unloading records as well and managed to distrill it into a jsbin: http://emberjs.jsbin.com/mazopeburo/2/edit Maybe this will help you as it's something similiar. |
@piotrpalek awesome JSBin to demonstrate the issue. I updated ember-data to use the |
Np :) @pangratz you sure about that? I click "unload post" then "refresh" and still get |
Oh boy, you're right. I guess I didn't look too closely 😢 Sorry for the false alarm. |
I think this might be solved on master, can you check please? |
I just took master for a spin and it seems like the Error: Assertion Failed: Passing classes to store methods has been removed. Please pass a dasherized string instead of mvc-tree@model:column: |
Waiting for #3192 |
I believe this was fixed as #3192 is closed. Please reopen if it still an issue |
I have a couple of acceptance tests that pass if run by themselves, but fail when all the tests are executed together. The error:
The failure happens at a portion of code that was added by this bug fix: bmac@c54323b
What is happening in my tests is that when the application is destroyed
unloadAll()
is being called and each record is being deleted like this:So, when we reach
flushCanonical
in this line:The assertion fails because the record doesn't have the
isDelete
property, but it has set to trueisDestroyed
andisDestroying
.Currently I have a workaround/hack that allows all the tests to pass:
The text was updated successfully, but these errors were encountered: