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

add PatchBehavior.PatchBehavior #66

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

add PatchBehavior.PatchBehavior #66

wants to merge 3 commits into from

Conversation

Newp
Copy link

@Newp Newp commented May 27, 2023

Left: {"value":1}
Right: {"value":3}

If you create a Diff in the above cases, it is generated as shown below.
Diff : {"value": [1,3]}

If normal, it will be treated as value=3.

However, if an unintended modulation occurs on the left and right for various reasons, such as concurrency control failure, and you try to diff/patch it, if you turn {"value":[2,3]} over to the parameter, it will eventually set to value=3.

As a result, the value of 3 is the same, but the user may not have intended it.

Therefore, we added PatchBehavior to Options to validate that left.value should be equal to right[0] if LeftMatchValidation is set in the replace operation.

I'm using it well. Thank you.

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.

1 participant