title: Doctrine 2.0: get classloader to work for entities
body: <p>I've been struggling quite some time to get my entities loaded in my first Doctrine 2.0 project. Everything works fine (got the other classes to load, connection with database trough DBAL is successful) except for loading my entity classes.</p>
  
  <p>I'll give you the information you need.</p>
  
  <ul>
  <li>I installed Doctrine trough the tarball method</li>
  <li><p>the structure of my folder is like this</p>
  
  <pre><code>public_html
    -&gt; docrine test
       -&gt; entities
          -&gt; User.php
          -&gt; Video.php
  </code></pre></li>
  <li><p>in my bootstrap file I'm trying to load it with</p>
  
  <pre><code>&lt;?php
  $sRoot = "/home/..../public_html/doctrinetest";
  $classLoader = new \Doctrine\Common\ClassLoader('doctrinetest\entities', $sRoot.'/doctrinetest/entities');
  $classLoader-&gt;register(); // register on SPL autoload stack
  </code></pre></li>
  <li><p>As namespace, I put the following line before defying the class</p>
  
  <pre><code>namespace doctrinetest\entities;
  </code></pre></li>
  <li><p>When I then try to run the command to generate my scheme</p>
  
  <pre><code>$tool = new \Doctrine\ORM\Tools\SchemaTool($em);
  $classes = array(
    $em-&gt;getClassMetadata('Video'),
    $em-&gt;getClassMetadata('User')
  );
  $tool-&gt;createSchema($classes);
  </code></pre></li>
  <li><p>I get the error</p>
  
  <pre><code>Warning: class_parents() [function.class-parents]: 
  Class Video does not exist and could not be loaded in
  /home/..../public_html/doctrine2-tarball/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php on line 40
  </code></pre></li>
  </ul>
  
  <p>Please help me on this one
  Thanks,
  Pj</p>