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
feat: m2m change detection follow up #1046
feat: m2m change detection follow up #1046
Conversation
… to be called after the hook cycles is evaluated, so we get the changes on m2m relations for every hook
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Grandlouis ; thanks for the PR! I'd like to try using a JoinRow.op
flag instead and see how that works; it will be similar to how InstanceData.op
works, which I think will be nice for clarity, and also probably help us eventually implementing the "use changes to get both old value + new value".
…cle, updating driver to use it, exposing reset function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great @Grandlouis , thank you!
# [1.168.0](v1.167.0...v1.168.0) (2024-05-19) ### Features * m2m change detection follow up ([#1046](#1046)) ([ed4be3d](ed4be3d))
🎉 This PR is included in version 1.168.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Trying to satisfy this ticket -> #1044
Update: I was only able to delay the "reset"/"update" of the m2m rows untilafterCommit
so all hooks get access to the m2m relation changes on thechanges.fields
proxyUpdate 2: Now the
JoinRow
has anop
fields that indicates the state it has on the flush cycle, whether it is pending, flushed or completed. We use this flags to indicate if there are changes on the m2m relations.Support for o2m, o2o and old value still pending 😅