title: Doctrine 2 Can't Seem to Remove Many to Many Relationships
body: <p>I have the following setup "<em>Many Users can have Many Projects (Collaborators)</em>"</p>
  
  <pre><code>/**
   * @Entity @HasLifeCycleCallbacks
   * @Table(name="projects")
   */
  class Project implements \Zend_Acl_Resource_Interface {
    /**
     * @ManyToMany(targetEntity="User", mappedBy="projects")
     * @OrderBy({"displayName" = "ASC", "username" = "ASC"})
     */
    protected $collaborators;
  
    ..
  }
  
  /**
   * @Entity 
   * @Table(name="users")
   */
  class User implements \Zend_Acl_Role_Interface {
    /**
     * @ManyToMany(targetEntity="Project", inversedBy="collaborators")
     */
    protected $projects;
    ...
  }
  </code></pre>
  
  <p>I tried to remove a collaborator using the following</p>
  
  <pre><code>$user = Application_DAO_User::findById($this-&gt;_getParam('userid'));
  $proj = Application_DAO_Project::getProjectById($this-&gt;_getParam('id'));
  Application_DAO_Project::removeCollaborator($proj, $user); // &lt;---
  
  // Application_DAO_User
  public static function findById($id) {
    return self::getStaticEm()-&gt;find('Application\Models\User', $id);
  }
  
  // Application_DAO_Project
  public static function getProjectById($id) {
    return self::getStaticEm()-&gt;find('Application\Models\Project', $id);
  }
  
  public static function removeCollaborator(Project $proj, User $collaborator) { // &lt;---
    $proj-&gt;getCollaborators()-&gt;remove($collaborator);
    $collaborator-&gt;getProjects()-&gt;remove($proj);
    self::getStaticEm()-&gt;flush();
  }
  </code></pre>
  
  <p>And there isn't any errors but the database stays the same ...</p>