title: hibernate join table mapping
body: <p>I want to map two entity classes:</p>
  
  <pre><code>@entity
  Class A{    
   private long A_ID // primarykey    
   private long userID // not a  primarykey    
  }
  
  @entity
  Class B{    
   private long B_ID // primary key    
  }
  </code></pre>
  
  <p>I want to join A and B where A_ID = B_ID. Is there any way to map both of them by using join table/association class that can have A_ID, B_ID and userID? I am not sure if this is possible?</p>
  
  <pre><code>Class A_B{    
   private long A_ID     
   private long userID     
   private long B_ID     
  }
  </code></pre>