title: Problem with delete instruction about createQueryBuilder, argument missing
body: <p>I have a problem with doctrine. I'm training to symfony and i get an error with the method below. 
  It seems createQueryBuilder is the cause. a parameter is missing, however I found many examples as mine, thus I don't understand what is missing. </p>
  
  <pre><code>public function deleteAdvertWithoutApplications($days)
  {
      $dateparam = (new \datetime())-&gt;modify('-' . $days . 'day');
  
      $qb = $this-&gt;createQueryBuilder()
          -&gt;delete('Advert', 'a')
          -&gt;where('a.application is EMPTY')
          -&gt;andWhere('a.updatedAt &lt; :dateparam')
          -&gt;setParameter('dateparam', $dateparam);
  
      $query = $qb-&gt;getQuery();
      //$query-&gt;getDQL();
      return $query-&gt;execute();
  }
  </code></pre>
  
  <p>This code throw this : </p>
  
  <p><code>Warning: Missing argument 1 for Doctrine\ORM\EntityRepository::createQueryBuilder(), called in ...</code> etc.</p>
  
  <p>the vendor code seems to be the cause</p>
  
  <p>in vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php (line 79)</p>
  
  <pre><code>/**
       * @param string $alias     
       * @param string $indexBy The index for the from.        
       * @return QueryBuilder     
  */    
  public function createQueryBuilder($alias, $indexBy = null)    
  {        
      return $this-&gt;_em-&gt;createQueryBuilder()            
           -&gt;select($alias)            
           -&gt;from($this-&gt;_entityName, $alias, $indexBy);    
  }
  </code></pre>
  
  <p>Do you have anidea about what is wrong ? 
  I use Doctrine, 2.5.15 and symfony 3.3.18 (php 7).</p>
  
  <p>Thanks by advance for your help.</p>