Skip to content

PUT does not remove nested properties [DATAREST-965] #1335

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

Closed
spring-projects-issues opened this issue Dec 21, 2016 · 3 comments
Closed

PUT does not remove nested properties [DATAREST-965] #1335

spring-projects-issues opened this issue Dec 21, 2016 · 3 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link

Ken Dombeck opened DATAREST-965 and commented

When removing items via PUT request on nested children they are not being removed. The request is behaving more like a PATCH than a PUT right now.

Here are the requests I am issuing:

Create parent

POST /parents -> 201
{
    "inner": {
        "items": [{"some": "test"}]
    }
}

update parent

PUT /parents/id -> 204
{
    "inner": {
        "object": "value"
    }
}

actual result

GET/parents/id -> 200
{
    "inner": {
        "items": [{"some": "test"}],
        "object": "value"
    }
}

expected result

GET/parents/id -> 200
{
    "inner": {
        "object": "value"
    }
}

Affects: 2.5.5 (Hopper SR5)

Reference URL: #247

Backported to: 2.6 GA (Ingalls), 2.5.7 (Hopper SR7)

1 votes, 3 watchers

@spring-projects-issues
Copy link
Author

Ken Dombeck commented

PR currently just has a couple of unit tests to reproduce this issue. There is not a fix yet

@spring-projects-issues
Copy link
Author

Ken Dombeck commented

This is similar to DATAREST-150 but with nested objects instead

@spring-projects-issues
Copy link
Author

Oliver Drotbohm commented

That should be in place now. I've changed the algorithm, to apply PUTs significantly as merging the values seems easier on that level and all the potential deserialization customizations have been in place.

I incorporated your test case in the fix I pushed and added you as author on the test case

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

No branches or pull requests

2 participants