title: Hibernate @OneToMany mapped by 2 different columns
body: <p>I have an object called <strong>Lecture</strong> and it has 2 fields which are both of type <strong>Teacher</strong></p>
  
  <pre><code>class Lecture{
  
      private Teacher teacher;
      private Teacher subsTeacher;
  
  }
  </code></pre>
  
  <p>Lets assume a Teacher may teach many lectures. So there is a one to many relation between Teacher -> Lecture</p>
  
  <p>Now in Teacher class I have:</p>
  
  <pre><code>@OneToMany(mappedBy = "teacher")
  @Cascade(value = {org.hibernate.annotations.CascadeType.DETACH, 
                              org.hibernate.annotations.CascadeType.LOCK})
  public Set&lt;Lecture&gt; getLectures() {
      return lectures;
  }
  </code></pre>
  
  <p>However, this will not return me the Lectures the teacher is subsTeacher to. But I need them as well. </p>
  
  <p>How can I achieve this?</p>
  
  <p><strong>Table structure:</strong></p>
  
  <p>Table: Lecture</p>
  
  <p>Columns: id, teacher_id, substeacher_id</p>
  
  <p>Table Teacher:</p>
  
  <p>Columns: id, name</p>