title: hibernate use two foreign keys for different coloumns?
body: <p>is it possible to map two foreign keys linked to the same table? its best i show you what i mean.</p>
  
  <p>i have a table called fixtures which currently looks like this:
  </p>
  
  <pre><code>&lt;class name="" table=""&gt;
      &lt;id name="id" column="id"&gt;
          &lt;generator class="Increment" /&gt;
      &lt;/id&gt;
      &lt;property name="date" type="" column="" /&gt;
      &lt;property name="" type="" column="" /&gt;
      &lt;many-to-one name="awayTeam" column="teamId" not-null="true" /&gt;
      &lt;many-to-one name="homeTeam" column="teamId" not-null="true" /&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p></p>
  
  <p>And i have another table called Teams which holds the teams data.</p>
  
  <p></p>
  
  <pre><code>&lt;class name="" table=""&gt;
      &lt;id name="teamId" column="id"&gt;
          &lt;generator class="Increment" /&gt;
      &lt;/id&gt;
      &lt;property name="name" type="String" column="name" /&gt;
      &lt;property name="fixturesUrl" type="String" column="fixturesUrl" /&gt;
      &lt;property name="rssNewsUrl" type="String" column="rssNewsUrl" /&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p></p>
  
  <p>in a match/fixture, each match has two teams, an away and home team that i want it to map and linked in a one to many relaltionship with my teams table. is that possible in hibernate? if so, how? what am i missing in my code?</p>
  
  <p>Is their also a way to say each fixture record cannot have same teams playing eachother i.e. away and home team has to be unique?</p>
  
  <p>cheers in advance</p>