title: Class 'entities\User' does not exist ?
body: <p>I have created a new project in folder [docx] and generated entities from existing database in the folder entities. 
  Here is fetch.php code:</p>
  
  <pre><code>&lt;?php
  // bootstrap.php
  // replace with file to your own project bootstrap
  require_once 'bootstrap.php';
  
  
  $em-&gt;getConfiguration()-&gt;addEntityNamespace('', 'entities');
  
  $UserRepo = $em-&gt;getRepository('User');
  
  
  $data = $UserRepo-&gt;findAll();
  echo '&lt;pre&gt;'; \Doctrine\Common\Util\Debug::dump($data);
  exit;
  </code></pre>
  
  <p>Here is the code of User Entity:</p>
  
  <pre><code>&lt;?php
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * User
   *
   * @ORM\Table(name="user", indexes={@ORM\Index(name="address_id", columns={"address_id"})})
   * @ORM\Entity
   */
  class User
  {
      /**
       * @var integer
       *
       * @ORM\Column(name="id", type="integer", nullable=false)
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="IDENTITY")
       */
      private $id;
  
      /**
       * @var string
       *
       * @ORM\Column(name="username", type="text", length=65535, nullable=false)
       */
      private $username;
  
      /**
       * @var \Address
       *
       * @ORM\ManyToOne(targetEntity="Address")
       * @ORM\JoinColumns({
       *   @ORM\JoinColumn(name="address_id", referencedColumnName="id")
       * })
       */
      private $address;
  
  
  
      /**
       * Get id
       *
       * @return integer
       */
      public function getId()
      {
          return $this-&gt;id;
      }
  
      /**
       * Set username
       *
       * @param string $username
       *
       * @return User
       */
      public function setUsername($username)
      {
          $this-&gt;username = $username;
  
          return $this;
      }
  
      /**
       * Get username
       *
       * @return string
       */
      public function getUsername()
      {
          return $this-&gt;username;
      }
  
      /**
       * Set address
       *
       * @param \Address $address
       *
       * @return User
       */
      public function setAddress(\Address $address = null)
      {
          $this-&gt;address = $address;
  
          return $this;
      }
  
      /**
       * Get address
       *
       * @return \Address
       */
      public function getAddress()
      {
          return $this-&gt;address;
      }
  }
  </code></pre>
  
  <p>When I try to fetch data from this entity I am getting an error:</p>
  
  <p><code>Fatal error: Uncaught Doctrine\Common\Persistence\Mapping\MappingException: Class 'entities\User' does not exist in D:\xampp\htdocs\docx\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\MappingException.php:96 Stack trace: #0 D:\xampp\htdocs\docx\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\RuntimeReflectionService.php(41): Doctrine\Common\Persistence\Mapping\MappingException::nonExistingClass('entities\\User') #1 D:\xampp\htdocs\docx\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php(281): Doctrine\Common\Persistence\Mapping\RuntimeReflectionService-&gt;getParentClasses('entities\\User') #2 D:\xampp\htdocs\docx\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php(311): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory-&gt;getParentClasses('entities\\User') #3 D:\xampp\htdocs\docx\vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php(78): Doctrine\Common\Persistence\Mapping\Abstr in</code> D:\xampp\htdocs\docx\vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\MappingException.php on line 96</p>