title: doctrine 2, how to remove many to many associations?
body: <p>How do you unlink a relation from a many-to-many table without deleting anything?</p>
  
  <p>I have tried:</p>
  
  <pre><code>$getProject = $this-&gt;_helper-&gt;getDocRepo('Entities\Project')-&gt;findOneBy(array('id' =&gt; $projectId));
  $getCat = $this-&gt;_doctrine-&gt;getReference('\Entities\Projectcat', $catId);
  
  $getProject-&gt;getCategory()-&gt;removeElement($getCat);
  $this-&gt;em-&gt;flush();
  </code></pre>
  
  <p>my Projectcat entity:</p>
  
  <pre><code>/**
   * @ManyToMany(targetEntity="\Entities\Projectcat", cascade={"persist", "remove"})
   * @JoinColumn(name="id", referencedColumnName="id")
   */
  protected $getCategory;
  </code></pre>