title: Can I bypass an intermediate object in hibernate
body: <p>I have top level entities TRACK, MEDIA_GROUP and MEDIA, each with an integer primary key.  I also have a join table from TRACK to MEDIA_GROUP which is 1:1 and MEDIA has a FK column into MEDIA_GROUP.  I'm trying to find a way in hibernate to map a collection of Media directly into the Track object, bypassing the creation of a MediaGroup object.</p>
  
  <p>Basically I want to turn this:</p>
  
  <pre><code>TRACK &lt;-&gt; MEDIA_TRACK_MAP &lt;-&gt; MEDIA_GROUP &lt;-&gt; MEDIA
  </code></pre>
  
  <p>into this:</p>
  
  <pre><code>TRACK &lt;-&gt; MEDIA_TRACK_MAP &lt;-&gt; MEDIA
  </code></pre>
  
  <p>But the join column between MEDIA_TRACK_MAP and MEDIA isn't the primary key of MEDIA.  </p>