title: Symfony2 - Doctrine: Redefinition of a class issue
body: <p>I have a strange kind of problem.<br/>
  I'm totally new to symfony2 so forgive me if this is a silly question.</p>
  
  <p>However, i'm trying to create two entities which will made persistent data onto a db and that two entities will be one for the user and one for Groups.<br/>
  I've defined those two classes following a <a href="http://symfony.com/doc/current/cookbook/security/entity_provider.html" rel="nofollow">tutorial</a> and everything seems to go fine as i create only the first entity and run <code>php app/console doctrine:schema:update --force</code> - BTW the db was alredy created!.</p>
  
  <p>In a second time i've decided to create the second entity (that will have a relationship with the first, and i've decided to use doctrine notation for define that relation).</p>
  
  <p>This is my <em>significant</em> code</p>
  
  <pre><code> // src/Sestante/UserBundle/Entity/User.php
   [...]
   /**
   * @ORM\ManyToMany(targetEntity="GroupAndRoles", inversedBy="users")
   *
   */
   private $groups;
   [...]
  </code></pre>
  
  <p>and</p>
  
  <pre><code>// src/Sestante/UserBundle/Entity/GroupAndRoles.php
  &lt;?php
  
  namespace Sestante\Bundle\UserBundle\Entity;
  
  use Symfony\Component\Security\Core\Role\RoleInterface;
  use Doctrine\Common\Collections\ArrayCollection;
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Table(name="groups")
   * @ORM\Entity()
   */
  class GroupAndRoles implements RoleInterface
  {
      /**
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id()
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  
      /**
       * @ORM\Column(name="name", type="string", length=30)
       */
      private $name;
  
      /**
       * @ORM\Column(name="role", type="string", length=20, unique=true)
       */
      private $role;
  
      /**
       * @ORM\ManyToMany(targetEntity="User", mappedBy="groups")
       */
      private $users;
  
      public function __construct()
      {
          $this-&gt;users = new ArrayCollection();
      }
  
      // ... getters and setters for each property
  
      /**
       * @see RoleInterface
       */
      public function getRole()
      {
          return $this-&gt;role;
      }
  }
  ?&gt;
  </code></pre>
  
  <p>As i run once again <code>php app/console doctrine:schema:update --force</code> i get this error</p>
  
  <blockquote>
    <p>Fatal error: Cannot redeclare class Sestante\Bundle\UserBundle\Entity\GroupAndRoles in /var/www/html/symfony/Symfony/src/Sestante/UserBundle/Entity/GroupAndRoles.php on line 13</p>
  </blockquote>
  
  <p>Moreover I've tried to find from the root of my application a file where that entity could be redefined with that command <code>find . -type f -exec grep Sestante\Bundle\UserBundle\Entity\GroupAndRoles {} \;</code> but no results were produced.</p>
  
  <p>I suppose that i'm missing something like, maybe, cache or something related to it? (read a chapter into symfony book that told something about that, but dind't remember it weel).</p>