title: How to map composite key of entity in JPA?
body: <p>I have the REGION table:</p>
  
  <pre><code>REG {
      id number,
      dateCreation Date
    }
  </code></pre>
  
  <p>I have a LOCALE table:</p>
  
  <pre><code>LOCALE {
       locale String
    }
  </code></pre>
  
  <p>I have a REGION_DESCRIPTION table:</p>
  
  <pre><code>REGION_DESCRIPTION {
       locale String,
       regId number,
       description
    } 
  </code></pre>
  
  <p>REGION_DESCRIPTION has a composite key: locale is a foreign key pointing to the LOCALE table. And regId points to the REGION table.</p>
  
  <p>I would like to map this to my Region java class:</p>
  
  <pre><code>private List&lt;RegionDescription&gt; descriptions;
  </code></pre>
  
  <p>I tried different approache in JPA. But I cannot get the mapping to work. Any suggestions? </p>