title: Spring REST partial update with @PATCH method
body: <p>I'm trying to implement a partial update of the Manager entity based in the following:</p>
  
  <p>Entity</p>
  
  <pre><code>public class Manager {
      private int id;
      private String firstname;
      private String lastname;
      private String username;
      private String password;
  
      // getters and setters omitted
  }
  </code></pre>
  
  <p>SaveManager method in Controller</p>
  
  <pre><code>@RequestMapping(value = "/save", method = RequestMethod.PATCH)
  public @ResponseBody void saveManager(@RequestBody Manager manager){
      managerService.saveManager(manager);
  }
  </code></pre>
  
  <p>Save object manager in Dao impl.</p>
  
  <pre><code>@Override
  public void saveManager(Manager manager) {  
      sessionFactory.getCurrentSession().saveOrUpdate(manager);
  }
  </code></pre>
  
  <p>When I save the object the username and password has changed correctly but the others values are empty.</p>
  
  <p>So what I need to do is update the username and password and keep all the remaining data.</p>