title: Hibernate with two foreign keys from same table- annotation
body: <p>I'm trying to design a hospitality app. I have two tables as <code>User</code> and <code>Request</code>. Users could be <code>Host</code> or <code>Visitor</code> and can send host request to each other. but there is no need to define Users as visitor or host, it doesn't matter for the system so I don't have seperate tables for them. This difference is just important in Request table and it's needed to keep <code>visitor_id</code> and <code>host_id</code> as foreign keys (mapped with <code>user_id</code> primary key column from User table because both host and visitor are also User).</p>
  
  <p>My question is how can I define this relation in hibernate with <code>Annotation</code>? I mean, there should be two foreign keys in Request table and they're mapped to *user_id* primary key column from User table. Every user can be host or visitor many times and makes none or many requests.</p>
  
  <pre><code>@Entity
  public class Request {
  @Id
  private Long req_id;
  
   ....
  
  }
  </code></pre>