title: The method name must start with either findBy, findOneBy, countBy
body: <p>I've got a command tryng to access a repository method. But I can't succeed.</p>
  
  <blockquote>
    <p>services.yml</p>
  </blockquote>
  
  <pre><code>app.command.app_checkOfferDemand:
      class: AppRefactoredBundle\Command\CheckOfferAndDemand
      arguments: ['@doctrine.orm.entity_manager']
      tags:
          - { name: console.command }
  </code></pre>
  
  <blockquote>
    <p>app_OfferRepository</p>
  </blockquote>
  
  <pre><code>class app_OfferRepository extends \Doctrine\ORM\EntityRepository
  {
      private function checkAndUpdate(){
          $em = $this-&gt;getContainer()-&gt;get('doctrine')-&gt;getManager();
          $qb = $em-&gt;createQueryBuilder();
          $q = $qb-&gt;update('app_Offer', 'o')
              -&gt;set('o.status_id', 2)
              -&gt;where('o.createdAt &lt; DATE_SUB(NOW(), INTERVAL 2 HOUR)')
              -&gt;getQuery();
          return  $q-&gt;execute();
      }
  }
  </code></pre>
  
  <blockquote>
    <p>CheckOfferAndDemand</p>
  </blockquote>
  
  <pre><code>class CheckOfferAndDemand extends Command{
  
  private $em;
  
  public function __construct(EntityManager $em)
  {
      parent::__construct();
      $this-&gt;em=$em;
  }
  
  protected function configure()
  {
      // On set le nom de la commande
      $this-&gt;setName('app:check_OfferDemand');
  
      // On set la description
      $this-&gt;setDescription("Permet de controler le timeout des offres et demandes");
  
      // On set l'aide
      $this-&gt;setHelp("Cette commande ne prend pas d'argument et travailler sur toutes les offres et demandes");
  }
  
  public function execute(InputInterface $input, OutputInterface $output){
      $output-&gt;writeln("update des offres");
      $this-&gt;em-&gt;getRepository('AppRefactoredBundle:app_Offer')-&gt;checkAndUpdate();
      $output-&gt;writeln("update des demandes");
      $this-&gt;em-&gt;getRepository('AppRefactoredBundle:app_Demand')-&gt;checkAndUpdate();
      $this-&gt;em-&gt;flush();
      $output-&gt;writeln("DONE");
  
     }
  }
  </code></pre>
  
  <p>The command by itself is working (the first update print is made).
  But then the error is triggered </p>
  
  <blockquote>
    <p>Undefined method 'checkAndUpdate'. The method name must start with either findBy, findOneBy or countBy!  </p>
  </blockquote>
  
  <p>The entities seems to be well declared too</p>
  
  <pre><code>/**
   * app_Offer
   *
   * @ORM\Table(name="app__offer")
   * @ORM\Entity(repositoryClass="AppRefactoredBundle\Repository\app_OfferRepository")
   */
  class app_Offer
  </code></pre>
  
  <p>Thanks for your help.</p>