title: Spring data rest merge patch
body: <p>I am using <strong>spring data rest</strong> in my project and have question about 
  <code>application/merge-patch+json</code> request.
  While <code>application/json-patch+json</code> request works good i have troubles with merge-patch.
  For example i have nested object without repository like this</p>
  
  <pre><code>"student":{
    "id":1,
    "address":{
     "id":1,
     "street":2,
     "building":2
   }
  }
  </code></pre>
  
  <p>And i am sending <code>PATCH</code>, <code>application/merge-patch+json</code> to <code>students/1</code>
  with this payload</p>
  
  <pre><code>{
    "address":{
     "street":3
    }
  }
  </code></pre>
  
  <p>I am getting this result</p>
  
  <pre><code>"student":{
    "id":1,
    "address":{
     "id":2,
     "street":3,
     "building":null
   }
  }
  </code></pre>
  
  <p>So spring data rest just created new address object instead of merging.</p>
  
  <p>Java code is like this </p>
  
  <pre><code>@Entity
  @Table(name = "Student")
  public class Student {
      @Id
      @GeneratedValue
      private long studentId;
  
      @OneToOne(cascade = CascadeType.ALL)
      @JoinColumn(name = "addressId")
      private Address address;
  
      //getters and setters
  }
  </code></pre>
  
  <p>Address class:</p>
  
  <pre><code>@Entity
  @Table(name = "Address")
  public class Address {
       @Id
       @GeneratedValue
       private long addressId;
       private String street;
       private String building;
  
       //getters and setters
  }
  </code></pre>
  
  <p>Also student have rest repository and address have not </p>
  
  <p>My question is how i can achieve correct behavior in merging patch requests in spring data rest?</p>