-
-
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
objectAt in hasMany relation after record removal still returns record #2968
Comments
👍 pretty sure I've just hit the same bug |
Ok I think I've isolated a possible way of reproduce click on the jsbins and try to hit the remove button, the list should shorten. if one simply uses the hasMany relationship it works but if as @denisovlev was mentioning I'd love to know whether this is actually a supported use case for the DS.ManyArray thanks! EDIT: pretty sure jsbins are useless now that I've actually read what @denisovlev wrote :P sry :D |
👍 This seems to be the cause of one of the long-standing bugs in one of our apps. We're on beta 15. |
I screwed up and thought this was the same bug as a more complex relationship bug I got stuck tackling. Apologies for that, I should've realized that this code was wrong. This was a premature optimization because we didn't want to copy over canonical array to the current array every time, but rather access it lazily. However that proved hard, so for the initial implementation I ended up copying. However this was not removed and snuck through code review. :( |
@trianglegrrl @lukegalea told me you had no bugs, feel free to ping me if things come up |
@igorT thanks! |
@igorT thanks for looking at it! Luke probably just forgot about this bug. :) I'll test it this weekend. |
This code in ManyArray returns record even after it was deleted from relation. Documentation for array says following:
Does current behavior means that we shouldn't use objectAt at hasMany relations?
The text was updated successfully, but these errors were encountered: