title: Using Spring Data JPA after performing save operation not able to get Parent record values
body: <p>Below are the mapping table pojo.</p>
  
  <pre><code>@Entity
  @Table(name = "user")
  public class User implements Serializable{
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "user_id", nullable = false, updatable = false)
      private Long id;
  
      @Column(name = "first_name")
      private String firstName;
  
      @OneToMany(mappedBy = "user")
      private  Collection&lt;Company&gt;  companyList;
  
      public Long getId() {
          return id;
      }
      public void setId(Long id) {
          this.id = id;
      }
      public String getFirstName() {
          return firstName;
      }
      public void setFirstName(String firstName) {
          this.firstName = firstName;
      }
      public Collection&lt;Company&gt; getCompanyList() {
          return companyList;
      }
      public void setCompanyList(Collection&lt;Company&gt; companyList) {
          this.companyList = companyList;
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@Entity
  @Table(name = "company")
  public class Company {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "company_id", nullable = false, updatable = false)
      private Long id;
  
      @Column(name = "company_name")
      private String companyName;
  
      @ManyToOne
      @JoinColumn(name="user_id")
      private User user;
  
      public Long getId() {
          return id;
      }
      public void setId(Long id) {
          this.id = id;
      }
      public String getCompanyName() {
          return companyName;
      }
      public void setCompanyName(String companyName) {
          this.companyName = companyName;
      }
      public User getUser() {
          return user;
      }
      public void setUser(User user) {
          this.user = user;
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Below code is will be stored data into company table.</p>
  
  <pre><code>        User user = new User();
          Company saveCompany = new Company();
          **user.setId(1L);**
          saveCompany.setUser(user);
          saveCompany.setCompanyName("test company18");
  
          **companyRepository.save(saveCompany);**
  </code></pre>
  
  <p>But, when i call below code, the value of firstName is displayed null.</p>
  
  <pre><code>        company = companyRepository.findCompanyByName("test company18");
          System.out.println("After new company test company:------" + company.getCompanyName());
          System.out.println("After new company test User Id:------" + company.getUser().getId());
          System.out.println("After new company test User FirstName:------" + **company.getUser().getFirstName()**);
  </code></pre>
  
  <p>what will be the changes required to get FirstName value instead of null.</p>
  
  <p>Thanks in advance.</p>