title: Doctrine 2, undefined entity method findOneBy*
body: <p>I have a strange issue. Here is the error message:</p>
  
  <p>Call to undefined method <code>MyProject\BlogBundle\Entity\Blog::findOneById()</code></p>
  
  <p>I have setup the mapping, the entity class was created using the console and I have updated the schema in the database. What could be causing this issue?</p>
  
  <p>I'm using symfony2. Here is the line:</p>
  
  <pre><code>$blogRepo = $this-&gt;get('myproject.blog.repository.blog');  
  $blog = $blogRepo-&gt;findOneById($id);  
  </code></pre>
  
  <p>Any ideas?</p>