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

detach method should delete pivot record from intermediate table for BelongsToMany #776

Closed
os-nikita opened this issue Jul 28, 2022 · 0 comments · Fixed by #778
Closed
Labels
bug An existing feature is not working as intended

Comments

@os-nikita
Copy link

os-nikita commented Jul 28, 2022

Describe the bug

The recent change that closed this issue #760 applied the change in behaviour to BelongsToMany as well, but this is not correct. A pivot record with one of the foreign keys nulled out is completely useless and can never be recovered.

For BelongsToMany specifically, the detach behaviour should be deleting the pivot record.

@os-nikita os-nikita added the bug An existing feature is not working as intended label Jul 28, 2022
@os-nikita os-nikita changed the title detach method should delete pivot record from intermediate table detach method should delete pivot record from intermediate table for BelongsToMany Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing feature is not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant