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 dropped OnChange notifications for paths with composite fields #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ayelrod
Copy link

@ayelrod ayelrod commented Oct 25, 2024

Paths that have composite fields defined can react to changes for any of those DB fields. If more than one of those fields changes when processing an OnChange event, the framework will generate two updates to process. This leads to an error because the framework handles multiple updates differently.

Handling multiple updates occurs here. Eventually, mergeYgotAtPath is called and that function tries to cast the GoStruct for the leaf path to a ValidatedGoStruct. This returns an error.

The fix is to only generate 1 update for leaf paths, even if multiple fields changed. A leaf path can never have more than 1 update because it is a single path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants