title: ManyToMany on same table
body: <p>I have a project in which I have a OneToMany relationship on the same database.</p>
  
  <p>Currently it is designed like this:</p>
  
  <pre><code>/**
   * @ORM\OneToMany(targetEntity="MyEntity", mappedBy="myCopiedItem")
   */
  protected $mySource;
  
  /**
   * @ORM\ManyToOne(targetEntity="MyEntity", inversedBy="mySource")
   * @ORM\JoinColumn(name="selected_myentity_copy_id", referencedColumnName="id")
   */
  protected $myCopiedItem;
  </code></pre>
  
  <p>But now I have to make this relationship ManyToMany. So I did this:</p>
  
  <pre><code>/**
   * @ORM\ManyToMany(targetEntity="MyEntity", mappedBy="myCopiedItem")
   */
  protected $mySource;
  
  /**
   * @ORM\ManyToMany(targetEntity="MyEntity", inversedBy="mySource")
   * @ORM\JoinTable(name="entity_has_copy")
   */
  protected $myCopiedItem;
  </code></pre>
  
  <p>but the "entity_has_copy" table that symfony created has only 1 item (myentity_id) and I want to have 2 fields "myentity_id" &amp; "selected_myentity_copy_id" which are both actualy id's from my "myentity" table...</p>
  
  <p>What do I have to modify in order to have both id's in my generated table? </p>
  
  <p>I'm sure I've missed something, but I cannot figure out WHAT :(</p>
  
  <blockquote>
    <p>Note: Entity / table names were renamed for privacy</p>
  </blockquote>