dotnet / dotnet/efcore

Json: consider using nested JSON_MODIFY changing individual properties rather than using common denominator

Open
#28,855 0 comments 0 reactions 0 assignees View on GitHub
area-json area-save-changes
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

Currently JSON partial update issues only one JSON_MODIFY per json column, finding common denominator for all the changes made. This makes it so that if we modify two properties on the opposite sides of a "tree", we end up replacing the entire tree (if the common denominator is the root). Instead, we could issue two JSON_MODIFY commands composed on each other that would just modify those 2 properties.

This depends on https://github.com/dotnet/efcore/issues/28845, as we need the ability to modify individual properties first, and also we need to do perf investigation, if this solution is even better than what we do currently (and maybe come up with some good heuristic?)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.