title: Hibernate: Two OneToMany properties, mapped by the same entity with different columns
body: <p>I know that this can be easily solved with an HQL query, however I prefered to simply have Hibernate handle this with a few OneToMany properties for me.</p>
  
  <p>Let me demonstrate what I want my domain model to look like in pseudo-code:</p>
  
  <pre><code>Game
    Long GameID
    Team HomeTeam
    Team AwayTeam
    @OneToMany(mappedBy="team")
    Set&lt;TeamPlay&gt; HomeTeamPlays
    @OneToMany(mappedBy="team")
    Set&lt;TeamPlay&gt; AwayTeamPlays
  </code></pre>
  
  <p>The table structure is similar, there are two foreign keys that both point to the Team table on the Game table.  Clearly if there were only one foreign key then it would represent a true One-To-Many relationship but in reality what I want is two bi-directional One-To-Many properies for the same entity child type.</p>
  
  <p>I don't believe using the @Where annotation will work as it requires a constant, and @JoinColumn is not allowed here.  If it is not possible then that is okay, I just wanted to here it from somebody else.</p>