-
-
Notifications
You must be signed in to change notification settings - Fork 97
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 full path support for the patch operations #442
Add full path support for the patch operations #442
Conversation
Doesn't this break existing functionality? |
src/Microsoft.Azure.CosmosRepository/Extensions/ExpressionExtensions.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.CosmosRepository/Extensions/ExpressionExtensions.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.CosmosRepository/Internals/InternalPatchOperation.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.CosmosRepository/Internals/InternalPatchOperation.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.CosmosRepository/Repositories/InMemoryRepository.Update.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.CosmosRepository/Repositories/InMemoryRepository.Update.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.CosmosRepository/Repositories/InMemoryRepository.Update.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.CosmosRepository/Repositories/InMemoryRepository.Update.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.CosmosRepository/Repositories/InMemoryRepository.Update.cs
Outdated
Show resolved
Hide resolved
@IEvangelist In my opinion, it shouldn't. If anyone has used Patch so far, they may have noticed quite quickly that only from the last member of the lambda a path is created. For these people, nothing will change. |
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.
Done.
8c5dca8
to
3ec1483
Compare
@all-contributors please add @mateuszkumpf for code and tests |
I've put up a pull request to add @mateuszkumpf! 🎉 |
I would like to propose a new solution to generate a path for Patch operations.
Currently, when a property is selected using a lambda to create a path for a Patch operation, the last property is selected and only the path is created based on that property. (Example: x => x.NestedObject.Property1 creates for us path /property1).
The proposed solution creates a full path for the Patch operation taking into account all the properties that have been selected in the lambda. (Example: x => x.NestedObject.Property1 creates for us path /nestedObject/property1)