title: Hibernate OneToMany and ManyToOne confusion! Null List!
body: <p>I have two tables...
  For example - Company and Employee (let's keep this real simple)</p>
  
  <pre><code>Company( id, name );
  Employee( id,  company_id );
  </code></pre>
  
  <p>Employee.company_id is a foreign key.</p>
  
  <p>My entity model looks like this...</p>
  
  <p><strong>Employee</strong></p>
  
  <pre><code>@ManyToOne(cascade = CascadeType.PERSIST)
  @JoinColumn(name = "company_id")
  Company company;
  </code></pre>
  
  <p><strong>Company</strong></p>
  
  <pre><code>@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
  @JoinColumn(name = "company_id")
  List&lt;Employee&gt; employeeList = new ArrayList&lt;Employee&gt;();
  </code></pre>
  
  <p>So, yeah I want a list of employees for a company.</p>
  
  <p>When I do the following...</p>
  
  <pre><code>Employee e = new Employee();
  e.setCompany(c); //c is an Company that is already in the database.
  DAO.insertEmployee(e); //this works fine!
  </code></pre>
  
  <p>If I then get my Company object it's list is empty!</p>
  
  <p>Ive tried endless different ways from the Hibernate documentation!</p>
  
  <p>Obviously not tried the correct one yet!</p>
  
  <p>I just want the list to be populated for me or find out a sensible alternative.</p>
  
  <p>Help would be greatly appreciated, thanks!</p>