title: Symfony error The class XXX was not found in the chain configured namespaces XXX
body: <p>There are some other questions on this subject already, but none of them were really helpful. I am new to Symfony, so it's pretty hard to get my head around it. </p>
  
  <p>I am in the file Client\IntranetBundle\LDAP\LDAPAuthenticationProvider.php and this code is causing an error:</p>
  
  <pre><code>$user = new LDAPUser($username);
  </code></pre>
  
  <p>I did add it's namespace which is:</p>
  
  <pre><code>use Client\IntranetBundle\LDAP\LDAPUser;
  </code></pre>
  
  <p>LDAPUser implements UserInterface</p>
  
  <p>The error I get is </p>
  
  <pre><code>The class 'Client\IntranetBundle\LDAP\LDAPUser' was not found in the chain
  configured namespaces Client\ClientBundle\Entity
  </code></pre>
  
  <p>What is that suppose to mean? From what I read it has something to do with the mapping.</p>
  
  <p>My Doctrine orm in the config.yml is set to:</p>
  
  <pre><code> orm:
      auto_generate_proxy_classes: %kernel.debug%
      auto_mapping: true
  </code></pre>
  
  <p>Hopefully you can help me.</p>
  
  <p><strong>EDIT #1</strong>:</p>
  
  <p>Actually, I found out that it was not</p>
  
  <pre><code>$user = new LDAPUser($username);
  </code></pre>
  
  <p>That is causing the error, but it is when I am trying to persist this entity:</p>
  
  <pre><code>$entityManager-&gt;persist($user);
  </code></pre>
  
  <p><strong>EDIT #2:</strong></p>
  
  <p>I'm confused with what's wrong with the mapping:</p>
  
  <pre><code>&lt;doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
                  http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"&gt;
  
  &lt;entity name="Client\IntranetBundle\LDAP\LDAPUser" table="users" repository-class="Client\ClientBundle\Repository\UserRepository"&gt;
      &lt;id name="id" type="integer" column="id"&gt;
          &lt;generator strategy="AUTO" /&gt;
      &lt;/id&gt;
      &lt;field name="username" column="username" type="string" length="100" /&gt;
  &lt;/entity&gt;
  </code></pre>
  
  <p></p>
  
  <p>Maybe it's because I'm jumping between two bundles?</p>