title: @JoinColumn in one to many association?
body: <p><a href="https://stackoverflow.com/questions/11938253/jpa-joincolumn-vs-mappedby">JPA JoinColumn vs mappedBy</a> says</p>
  
  <blockquote>
    <p>The annotation @JoinColumn indicates that this entity is the owner of
    the relationship (that is: the corresponding table has a column with a
    foreign key to the referenced table),</p>
  </blockquote>
  
  <p>Now I have below code where I have mentioned <code>@JoinColumn</code> under college entity which is non owner entity and student is the owner entity as it has column pointing to primary key column in student table.<br />
  So it is reverse of above statement. </p>
  
  <p>Does it mean above statement is applicable for one to one or many to one association not for one to many ?</p>
  
  <pre><code>@Entity
  public class College {
  
      .........
      @OneToMany(cascade=CascadeType.ALL)
      @JoinColumn(name="COLLEGE_COLLEGEID")
      private List&lt;Student&gt; students;
  
  
  }
  
  @Entity
  public class Student {
  ...
  
  }
  </code></pre>
  
  <p><strong>UPDATE :-</strong>  i have college and student tables. Student has column college_collegeId which is foreign key to collegeId in college table.
  With below code i am able to save college and student entity where college_collegeId contains value pointing to foreign key to collegeId in college table</p>
  
  <pre><code>public  void saveCollege() {
      Student student1= new Student();
      student1.setStudentName("Student1");
  
  
      ArrayList&lt;Student&gt; list= new ArrayList&lt;Student&gt;();
      list.add(student1);
  
      College college1= new College();
      college1.setCollegeName("College3");
      college1.setCollegeId(1);
  
      college1.setStudents(list);
  
  
      getEntityManager().merge(college1);
  }
  </code></pre>