Skip to content
Advertisement

Spring REST partial update with @PATCH method

I’m trying to implement a partial update of the Manager entity based in the following:

Entity

JavaScript

SaveManager method in Controller

JavaScript

Save object manager in Dao impl.

JavaScript

When I save the object the username and password has changed correctly but the others values are empty.

So what I need to do is update the username and password and keep all the remaining data.

Advertisement

Answer

You can write custom update query which updates only particular fields:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement