title: doctrine : generate entities from the database
body: <p>I'm using doctrine to generate the entities from database in command line</p>
  
  <p><code>doctrine orm:convert-mapping  --force --from-database annotation ./Api/Entity</code></p>
  
  <p>The php class is created correctly but when i try to use the repository to load the entity from the database</p>
  
  <pre><code>$decompte=$entityManager-&gt;getRepository(Decompte::class)-&gt;find(31);
  </code></pre>
  
  <p>I'm getting this exception </p>
  
  <pre><code>Class "entity\Decompte" is not a valid entity or mapped super class.
  </code></pre>
  
  <p>and please find above the entire code of  the class entity\Decompte</p>
  
  <pre><code>&lt;?php
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * Decompte
   *
   * @ORM\Table(name="decompte", indexes={@ORM\Index(name="N°D", columns={"ID"})})
   * @ORM\Entity
   */
  class Decompte
  {
      /**
       * @var int
       *
       * @ORM\Column(name="ID", type="integer", nullable=false)
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="IDENTITY")
       */
      private $id;
  
      /**
       * @var int|null
       *
       * @ORM\Column(name="NPRIXD", type="integer", nullable=true)
       */
      private $nprixd;
  
      /**
       * @var string|null
       *
       * @ORM\Column(name="DESIGNATIOND", type="string", length=43, nullable=true)
       */
      private $designationd;
  
      /**
       * @var string|null
       *
       * @ORM\Column(name="UNITED", type="string", length=2, nullable=true)
       */
      private $united;
  
      /**
       * @var int|null
       *
       * @ORM\Column(name="QTED", type="integer", nullable=true)
       */
      private $qted;
  
      /**
       * @var int|null
       *
       * @ORM\Column(name="PRIXHTD", type="integer", nullable=true)
       */
      private $prixhtd;
  
      /**
       * @var string|null
       *
       * @ORM\Column(name="DECOMPTED", type="string", length=2, nullable=true)
       */
      private $decompted;
  
      /**
       * @var int|null
       *
       * @ORM\Column(name="TOTALD", type="integer", nullable=true)
       */
      private $totald;
  
      /**
       * @var string|null
       *
       * @ORM\Column(name="QMARCHE", type="string", length=11, nullable=true)
       */
      private $qmarche;
  
      /**
       * @var string|null
       *
       * @ORM\Column(name="QDECOMPTE", type="string", length=5, nullable=true)
       */
      private $qdecompte;
  
      /**
       * @var int|null
       *
       * @ORM\Column(name="SMARCHE", type="integer", nullable=true)
       */
      private $smarche;
  
      /**
       * @var string|null
       *
       * @ORM\Column(name="SDECOMPTE", type="string", length=6, nullable=true)
       */
      private $sdecompte;
  
      /**
       * @var int|null
       *
       * @ORM\Column(name="NDMR", type="integer", nullable=true)
       */
      private $ndmr;
  
      /**
       * @var string|null
       *
       * @ORM\Column(name="RESTE", type="string", length=11, nullable=true)
       */
      private $reste;
  
      /**
       * @var string|null
       *
       * @ORM\Column(name="RESTEF", type="string", length=11, nullable=true)
       */
      private $restef;
  
  
  }
  </code></pre>
  
  <p>when trying  to debug this issue, i found out that the Annotation Driver reader's cache is empty</p>
  
  <p>i've added somme "echo" in the AnnotationDriver::loadMetaDataForClass</p>
  
  <pre><code> echo 'allClassName'.$this-&gt;getAllClassNames();
      echo 'allPaths'.$this-&gt;getPaths();
      returns an empty array
  
  
  $classAnnotations = $this-&gt;reader-&gt;getClassAnnotations($class);
  is also empty
  </code></pre>
  
  <p>thank you very much for you help</p>