title: JPA: @JoinTable - Both columns are Primary Keys.. How do I stop that?
body: <p>This is my annotation I use to generate my Join Table.  </p>
  
  <pre><code>@OneToMany(cascade = CascadeType.ALL)
  @JoinTable(name = "service_operations", 
          joinColumns = { @JoinColumn(name = "serviceId") },
          inverseJoinColumns = { @JoinColumn(name = "operationId") })
  public Set&lt;Operation&gt; getOperations() {
      return operations;
  }
  </code></pre>
  
  <p>Considering this is a OneToMany association, my natural assumption is that this table would generate a </p>
  
  <p>[ Primary Key | Foreign Key ] table, however everytime I drop and re create the database it is not the case:</p>
  
  <pre><code>mysql&gt; describe workflow_services;
  +-------------+------------+------+-----+---------+-------+
  | Field       | Type       | Null | Key | Default | Extra |
  +-------------+------------+------+-----+---------+-------+
  | workflow_id | bigint(20) | NO   | PRI | NULL    |       |
  | service_id  | bigint(20) | NO   | PRI | NULL    |       |
  +-------------+------------+------+-----+---------+-------+
  2 rows in set (0.00 sec)
  </code></pre>
  
  <p>Im a tad baffled by this.  Any suggestions?</p>