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

Problem with updating collection of associated resources #2394

Open
kmochocki opened this issue Jul 5, 2024 · 0 comments
Open

Problem with updating collection of associated resources #2394

kmochocki opened this issue Jul 5, 2024 · 0 comments
Assignees
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@kmochocki
Copy link

Hi,

In our project we have a few resources, and one of them is aggregating the rest with the OneToMany relations (per each resource). During the creation (POST) of the main resource we're providing the URIs to the associated resources and eveything works fine (providing zero, one or more links).

The issues apear when we try to update the main resource. While using PATCH, we can modify the collections with associations (add, reduce, remove all), but when we're using PUT, no changes are propagated.

We proceeded with using PUT as the only way to update the resources and prior to 4.3.X version we had a really hacky way to achieve the expected result (using a similar request body structure for POST and PUT which updates the collections), but now it doesn't work.

Please have a look on the sample project and let us know if the setup or assumptions are wrong.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 5, 2024
@schauder schauder assigned schauder and odrotbohm and unassigned schauder Jul 8, 2024
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

No branches or pull requests

4 participants