title: Doctrine 2 and Zf2 integration
body: <p>I want to integrate doctrine 2 with zf2. I follow this tutorial: <a href="http://www.jasongrimes.org/2012/01/using-doctrine-2-in-zend-framework-2/" rel="nofollow">http://www.jasongrimes.org/2012/01/using-doctrine-2-in-zend-framework-2/</a></p>
  
  <p>But i have some problems with doctrine cli.</p>
  
  <p>When i type "project\vendor\doctrine\doctrine-module\bin\doctrine-module orm:generate-proxies", it gives me this message: 'No Metadata Classes to process'.</p>
  
  <p>This is my module.config.php file:</p>
  
  <pre><code>return array(
  'controllers' =&gt; array(
      'invokables' =&gt; array(
          'User\Controller\User' =&gt; 'User\Controller\UserController',
      ),
  ),
  'view_manager' =&gt; array(
      'template_path_stack' =&gt; array(
          'user' =&gt; __DIR__ . '/../view',
      ),
  ),
  'router' =&gt; array(
      'routes' =&gt; array(
          'user' =&gt; array(
              'type'    =&gt; 'segment',
              'options' =&gt; array(
                  'route'    =&gt; '/user[/:action][/:id]',
                  'constraints' =&gt; array(
                      'action' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*',
                      'id'     =&gt; '[0-9]+',
                  ),
                  'defaults' =&gt; array(
                      'controller' =&gt; 'User\Controller\User',
                      'action'     =&gt; 'userList',
                  ),
              ),
          ),
      ),
  ),
  
  // Doctrine config
  'doctrine' =&gt; array(
      'driver' =&gt; array(
          __NAMESPACE__ . '_driver' =&gt; array(
              'class' =&gt; 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
              'cache' =&gt; 'array',
              'paths' =&gt; array(__DIR__ . '/../src/' . __NAMESPACE__ . '/Entity')
          ),
      'orm_default' =&gt; array(
              'drivers' =&gt; array(
                  __NAMESPACE__ . '\Entity' =&gt; __NAMESPACE__ . '_driver'
              )
          )
      )
  )
  );
  </code></pre>
  
  <p>And this is the \User\src\Entity\Users.php</p>
  
  <pre><code>namespace User\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  use Doctrine\Common\Annotations\AnnotationReader;
  use Doctrine\Common\Annotations\AnnotationRegistry;
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="user")
   * @property string $username
   * @property int $id
   */
  class User
  {
  /**
   * @ORM\Id 
   * @ORM\GeneratedValue
   * @ORM\Column(type="integer")
   * @var int
   */
  private $id;
  
  /**
   * @ORM\Column(type="string")
   */
  private $username;
  }
  </code></pre>
  
  <p>If i remove the ORM\ from annotations it gives me the message 'The annotation "@Entity" in class User\Entity\User was never imported. Did you maybe forget to add a "use" statement for this annotation?'</p>