title: Doctrine 2 - No Metadata Classes to process by orm:generate-repositories
body: <p>I'm trying to generate entity repositories and getting such message </p>
  
  <p><strong>No Metadata Classes to process</strong></p>
  
  <p>I'd tracked down that use of </p>
  
  <p>use Doctrine\ORM\Mapping as ORM;
  and 
  @ORM\Table
  is not working properly. </p>
  
  <p>If i change all @ORM\Table to just @Table(and other annotations) - it start to work, but I really don't want to get it that way as it should work with @ORM annotation. </p>
  
  <p>I followed instructions from page below with no luck. I know I'm close but missing something with file paths or namespaces. Please help. </p>
  
  <p><a href="http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/annotations.html" rel="noreferrer">http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/annotations.html</a></p>
  
  <p>Does anyone had such problem? What I missing?</p>
  
  <p>cli-config, </p>
  
  <pre><code>use Doctrine\Common\Annotations\AnnotationReader;
  use Doctrine\Common\Annotations\AnnotationRegistry;
  
  require_once 'Doctrine/Common/ClassLoader.php';
  
  define('APPLICATION_ENV', "development");
  error_reporting(E_ALL);
  
  
  
  //AnnotationRegistry::registerFile("Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php");
  //AnnotationRegistry::registerAutoloadNamespace("Symfony\Component\Validator\Constraint", "Doctrine/Symfony");
  //AnnotationRegistry::registerAutoloadNamespace("Annotations", "/Users/ivv/workspaceShipipal/shipipal/codebase/application/persistent/");
  
  $classLoader = new \Doctrine\Common\ClassLoader('Doctrine');
  $classLoader-&gt;register();
  
  $classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__ . '/application/');
  $classLoader-&gt;register();
  $classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__ . '/application/persistent');
  $classLoader-&gt;register();
  
  $config = new \Doctrine\ORM\Configuration();
  $config-&gt;setProxyDir(__DIR__ . '/application/persistent/Proxies');
  $config-&gt;setProxyNamespace('Proxies');
  
  $config-&gt;setAutoGenerateProxyClasses((APPLICATION_ENV == "development"));
  
  
  $driverImpl = $config-&gt;newDefaultAnnotationDriver(array(__DIR__ . "/application/persistent/Entities"));
  $config-&gt;setMetadataDriverImpl($driverImpl);
  
  if (APPLICATION_ENV == "development") {
      $cache = new \Doctrine\Common\Cache\ArrayCache();
  } else {
      $cache = new \Doctrine\Common\Cache\ApcCache();
  }
  
  $config-&gt;setMetadataCacheImpl($cache);
  $config-&gt;setQueryCacheImpl($cache);
  
  
  $connectionOptions = array(
      'driver'   =&gt; 'pdo_mysql',
      'host'     =&gt; '127.0.0.1',
      'dbname'   =&gt; 'mydb',
      'user'     =&gt; 'root',
      'password' =&gt; ''
  
  );
  
  $em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config);
  $platform = $em-&gt;getConnection()-&gt;getDatabasePlatform();
  $platform-&gt;registerDoctrineTypeMapping('enum', 'string');
  
  $helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
       'db' =&gt; new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em-&gt;getConnection()),
       'em' =&gt; new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
  ));
  </code></pre>
  
  <p>User.php(working version, initially it was as described, @Table was @ORM\Table and other annotations similar had @ORM\ part like @ORM\Column etc)</p>
  
  <pre><code>&lt;?php
  namespace Entities;
  
  
  use Doctrine\Mapping as ORM;
  
  /**
   * User
   *
   * @Table(name="user")
   * @Entity(repositoryClass="Repository\User")
   */
  class User
  {
      /**
       * @var integer $id
       *
       * @Column(name="id", type="integer", nullable=false)
       * @Id
       * @GeneratedValue
       */
      private $id;
  
      /**
       * @var string $userName
       *
       * @Column(name="userName", type="string", length=45, nullable=false)
       */
      private $userName;
  
      /**
       * @var string $email
       *
       * @Column(name="email", type="string", length=45, nullable=false)
       */
      private $email;
  
      /**
       * @var text $bio
       *
       * @Column(name="bio", type="text", nullable=true)
       */
      private $bio;
  
      public function __construct()
      {
  
      }
  
  }
  </code></pre>