title: Doctrine how to use ANY_VALUE mysql function
body: <p>Since mysql 5.7.5 group by have change</p>
  
  <p><a href="https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html" rel="nofollow noreferrer">https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html</a></p>
  
  <p>If I make this query</p>
  
  <pre><code>$qb = $this-&gt;createQueryBuilder('d');
  $qb-&gt;select('ANY_VALUE(d.id), d.nom, count(d.nom) as lignes');
  $qb-&gt;groupBy('d.nom');   
  $qb-&gt;orderBy('d.nom');
  </code></pre>
  
  <p>I have a error</p>
  
  <p>Expression #1 of <code>SELECT</code> list is not in <code>GROUP BY</code> clause and contains nonaggregated column '<code>sepultures.d0_.id</code>' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by</p>
  
  <p>As explain in mysql doc, this problem can resolve with any_value like this</p>
  
  <pre><code>$qb = $this-&gt;createQueryBuilder('d');
  $qb-&gt;select('ANY_VALUE(d.id), d.nom, count(d.nom) as lignes');
  $qb-&gt;groupBy('d.nom');   
  $qb-&gt;orderBy('d.nom');
  </code></pre>
  
  <p>But doctrine don't recognize this function</p>
  
  <blockquote>
    <p>[2/2] QueryException: [Syntax Error] line 0, col 7: Error: Expected
    known function, got 'ANY_VALUE'</p>
  </blockquote>
  
  <p>How can I resolve it?</p>