Skip to content
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

fix: clear relationships properly when unloading new records #8791

Merged
merged 4 commits into from
Aug 27, 2023

Conversation

Windvis
Copy link
Contributor

@Windvis Windvis commented Aug 23, 2023

Description

Unloading a new record that is related to another record does not remove it from the relationships. This then causes issues if the other record also is unloaded or if code expects the relationships to no longer include the unloaded record. This adds a failing test case.

This behavior seems to have changed in EmberData v4.7+, older versions seemingly work as expected.

Related Discord thread: https://discord.com/channels/480462759797063690/1143193491250368583
Similar issue: #8262

@runspired runspired added 🎯 beta PR should be backported to beta 🎯 release PR should be backported to release 🎯 canary PR is targeting canary (default) 🎯 lts The PR should be backported to the most recent LTS 🏷️ bug This PR primarily fixes a reported issue labels Aug 26, 2023
@runspired runspired force-pushed the fix/rollback-new-related-records branch from 3ae43de to db1efc8 Compare August 26, 2023 04:03
Windvis and others added 4 commits August 26, 2023 18:27
Unloading a new record that is related to another record does not remove it from the relationship.
@runspired runspired force-pushed the fix/rollback-new-related-records branch from f2afc14 to 373a096 Compare August 27, 2023 02:30
@runspired runspired changed the title Failing test for the unloading of multiple linked new records problem fix: clear relationships properly when unloading new records Aug 27, 2023
@runspired runspired added the lts-4-12 Long Term LTS Maintenance label Aug 27, 2023
@runspired runspired merged commit edf2a0b into emberjs:main Aug 27, 2023
@Windvis Windvis deleted the fix/rollback-new-related-records branch August 28, 2023 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎯 beta PR should be backported to beta 🎯 canary PR is targeting canary (default) 🎯 lts The PR should be backported to the most recent LTS 🎯 release PR should be backported to release 🏷️ bug This PR primarily fixes a reported issue lts-4-12 Long Term LTS Maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants