title: Symfony2 cookbook load user from DB tutorial - repository class missing
body: <p>I am trying to follow the Symfony2 cookbook tutorial for loading users from a DB.</p>
  
  <p>The tutorial assumes you have a ACME/UserBundle and my installation doesn't, but I just assumed I could make my own (it's not like a plugin-packade I need to download somewhere right?).</p>
  
  <p>I created a bundle UserBundle and copy-pasted the code from the tutorial's entity User (first code box <a href="http://symfony.com/doc/current/cookbook/security/entity_provider.html" rel="nofollow">here</a>).</p>
  
  <p>This line seems to break things for me:</p>
  
  <pre><code>  @ORM\Entity(repositoryClass="Mycompany\UserBundle\Entity\UserRepository")
  </code></pre>
  
  <p>The error message I get is:</p>
  
  <pre><code>Fatal error: Class 'mycompany\UserBundle\Entity\UserRepository' not
  found in /var/www/mycompany/vendor/doctrine/lib/Doctrine/ORM/EntityManager.php
  on line 578
  </code></pre>
  
  <p>So I either assume I couldn't just create my own UserBundle (strange since I thought this was a tutorial on how to do it, not how to install a plugin that does it), or they assumed I knew that I somehow needed to register the entity among entityRepositories somehow?</p>
  
  <p>I will be most grateful if anyone more senior in symfony would enlighten me on this. I truly love all that I have learned about Symfony2 so far, but I am a bit of a slow learner here.</p>