title: JPA 2.0 / Hibernate custom join clause on association
body: <p>I would like to associate 2 entities using hibernate or JPA 2.0 annotations with a custom join clause. The clause is not the usual FK/PK equality. In SQL this would be something like this:</p>
  
  <pre><code>join b on a.id = 1000 * b.a_id
  </code></pre>
  
  <p>is it possible to annotate such a custom join where clause and to ignore the default one </p>
  
  <pre><code>join b on a.id = b.a_id
  </code></pre>