title: How to map doctrine entities
body: <p>I want to adapt my folder structure to something similar:</p>
  
  <pre><code>app 
  └─── ...
  bin 
  └─── ...    
  src
  └───MyNamespace
      ├───Application
      │   ├───Controller
      │   │   └───UserController.php      
      │   ├───Entity
      │   │   └───User
      │   │       ├───User.php
      │   │       └───UserFactory.php
  vendor 
  └─── ...        
  web 
  └─── ...
  </code></pre>
  
  <p>my config.yml file in the orm section looks like:</p>
  
  <pre><code>orm:
      auto_generate_proxy_classes: "%kernel.debug%"
      auto_mapping: false
      mappings:
          user:
            type:      php
            dir:       %kernel.root_dir%/../src/MyNamespace/Application/Entity/User/User
            prefix:    MyNamespace\Application\Entity\User\User
            alias:     User
            is_bundle: false    
  </code></pre>
  
  <p>and my User.php file starts with:</p>
  
  <pre><code>namespace MyNamespace\Application\Entity\User;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * User
   *
   * @ORM\Table()
   * @ORM\Entity
   */
  class User
  {
  ...
  }
  </code></pre>
  
  <p>And then I get the:</p>
  
  <p>InvalidArgumentException: Specified non-existing directory "C:/www/myapp/app/../src/MyNamespace/Application/Entity/User/User" as Doctrine mapping source.</p>
  
  <p>Btw, I'm using the Symfony2 framework. </p>