title: Mapping two columns in a table to the same column in another table
body: <p>I am creating a web application using spring and hibernate. Is it possible to have multiple @ManyToOne mappings in one table that reference the same Column in another table? What I mean is </p>
  
  <p>If I have these two tables </p>
  
  <pre><code>@Entity
  @Table(name="AUTHOR")
  public class Author{
  
  @Id
  @GeneratedValue
  @Column(name="AUTHOR_ID")   
  private IntegerauthorId;
  
  @Column(name="AUTHOR_NAME")
  private String authorName;
  
  
  ...
  
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>@Entity
  @Table(name="BOOK")
  public class book{
  
  @Id
  @GeneratedValue
  @Column(name="BOOK_ID")
  private Integer bookId;
  
  
  @Column(name="TITLE")
  private String title; 
  
  @Column(name="PREFACE_AUTHOR")
  private Author prefaceAuthor;
  
  @Column(name="BOOK_AUTHOR")
  private Author bookAuthor;
  
  ...
  
  }
  </code></pre>
  
  <p>How do I do the mapping so that I can populate both <code>PREFACE_AUTHOR</code> and <code>BOOK_AUTHOR</code> from the <code>AUTHOR</code> table? 
  One Author can be both the preface and book author but there can only be one preface author and one book author per book. </p>
  
  <p>Let me know if there is anything I can clarify.</p>
  
  <p>Thank you for the help!</p>
  
  <p>/D</p>