title: Doctrine 2 multiple primary keys
body: <p>For some reason doctrine is trying to insert an index called primary instead of actually adding a primary key on my MYSQL database, this is what Doctrine generates:</p>
  
  <pre><code>CREATE UNIQUE INDEX primary ON my_table (columnOne, columnTwo);
  </code></pre>
  
  <p>This is what my SQL editor generates and this is the only method that works:</p>
  
  <pre><code>ALTER TABLE my_table ADD PRIMARY KEY  (columnOne,columnTwo);
  </code></pre>
  
  <p>This is my class:</p>
  
  <pre><code>....
  class MyTable
  {
      /**
       * @var integer $columnOne
       *
       * @Column(name="columnOne", type="integer", nullable=false)
       * @Id
       * @GeneratedValue(strategy="NONE")
       */
      private $columnOne;
  
      /**
       * @var integer $columnTwo
       *
       * @Column(name="columnTwo", type="integer", nullable=false)
       * @Id
       * @GeneratedValue(strategy="NONE")
       */
      private $columnTwo;
  }
  </code></pre>