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

Updating nested collection elements using JSON Patch throws exception #2401

Open
EdikAmperyan opened this issue Aug 5, 2024 · 0 comments · May be fixed by #2402
Open

Updating nested collection elements using JSON Patch throws exception #2401

EdikAmperyan opened this issue Aug 5, 2024 · 0 comments · May be fixed by #2402
Assignees
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@EdikAmperyan
Copy link

EdikAmperyan commented Aug 5, 2024

  1. Create object A
  2. Add element B to nested collection field of object A
  3. Add element C to nested collection field of object B
  4. Change any field of object C

Changing B works but C and nested throws exception.

Fix

At this line base.nested(segment) does not always return expected element but it can be obtained by PropertyPath.from(property, currentType).

Example code with postman and curl requests.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 5, 2024
EdikAmperyan added a commit to EdikAmperyan/spring-data-rest that referenced this issue Aug 5, 2024
Fix updating nested collection fields using JSON Patch

Closes spring-projects#2401
Related tickets spring-projects#2401
EdikAmperyan added a commit to EdikAmperyan/spring-data-rest that referenced this issue Aug 5, 2024
Fix updating nested collection fields using JSON Patch

Closes spring-projects#2401
Related tickets spring-projects#2401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants