title: Hibernate One to Many Mapping is trying to update mapping column to null
body: <p>I am using below mapping</p>
  
  <pre><code>@Entity
  @Table(name = "test")
  public class TestOrder implements Serializable {
  
      @Id
      @Column(name = "orderid", updatable = false)
      protected Long orderId;
  
      @OneToMany(cascade = {CascadeType.ALL})
      @JoinColumn(name = "order_id_fk")
      private List&lt;TestDetails&gt; details;
  
  //getters and setters
  }
  
  @Entity
  @Table(name="test_details")
  public class TestDetails implements Serializable {
  
      @Id
      //Generator
      @Column(name = "id", updatable = false, insertable = false)
      protected Long id;
  
      @Column(name="order_id_fk", updatable = false)
      private Long orderId;
  //getters and setters
  }
  </code></pre>
  
  <p>When I update/insert the data, it's trying to update the <code>order_id_fk</code> to null</p>
  
  <pre><code>SQL [update test_details set order_id_fk'='null where order_id_fk'='? and id'='?]; constraint [null];
  </code></pre>
  
  <p>Any help is much appreciated.</p>
  
  <p>Updating/Inserting using Spring Integration</p>
  
  <pre><code>&lt;int-jpa:updating-outbound-gateway entity-class="com.aaaa.TestOrder" entity-manager-factory="myEntityManagerFactory" persist-mode="MERGE"&gt;
      &lt;int-jpa:transactional propagation="REQUIRED" transaction-manager="myTransactionManager" /&gt;
  &lt;/int-jpa:updating-outbound-gateway&gt;
  </code></pre>