title: JPA hibernate foreign key not set in entity
body: <p>I am performing a parent child save using CASCADE.PERSIST</p>
  
  <pre><code>@Entity
  @Table(name = "parent")
  public class Parent extends AbstractAuditingEntity{
  
      @OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.PERSIST)
      @JoinColumn(name = "parent_id",nullable = false)
      private List&lt;Child&gt; children;
  
  }
  
  
  @Entity
  @Table(name = "child")
  public class Child extends AbstractAuditingEntity{
  
      @Column(name = "parent_id", insertable=false, updatable=false)
      private Long parentId;
  
  }
  </code></pre>
  
  <p>When I save the parent ,the child also gets saved along with the foreign key.</p>
  
  <pre><code>parent = parentRepository.save(parent);
  </code></pre>
  
  <p>But the entity that is returned from the repository does not have the foriegn key set in the child. </p>
  
  <p><em>child.getParentId()</em> is null .</p>
  
  <p>Is there anyway I can get it done ? </p>
  
  <hr>
  
  <p>Tried setting the parent in the child but same problem exists</p>
  
  <pre><code>@Entity
  @Table(name = "child")
  public class Child extends AbstractAuditingEntity{
  
      @ManyToOne
      @JoinColumn(name="parent_id",nullable = false,insertable=false,updatable=false)
      private Queue queue;
  }
  </code></pre>
  
  <p>Though this is a not a critical issue ( i can set it manually from the parent ) - Just wanted to be sure If I am doing it right.</p>