title: Doctrine 2.0 NativeQuery ResultSetMapping for count(id)
body: <p>I generate an SQL from NativeQuery and this is the result sql:</p>
  
  <blockquote>
    <p>SELECT COUNT(id) AS tot,created_at FROM property WHERE created_at
    BETWEEN '20120501000000' AND '20120521235959' GROUP BY
    YEAR(created_at),MONTH(created_at),DAY(created_at);</p>
  </blockquote>
  
  <p>This is my ResultSetMapping:</p>
  
  <pre><code>$rsm = new \Doctrine\ORM\Query\ResultSetMapping;
  $rsm-&gt;addEntityResult('Entity\Property', 'p');
  $rsm-&gt;addFieldResult('p','count(id)','tot'); // &lt;-- this don't work
  $rsm-&gt;addFieldResult('p','created_at','created_at');
  </code></pre>
  
  <p>The result running the above query direct on mysql is ok:</p>
  
  <pre><code>tot created_at
  11  2012-05-02 11:23:25
  11  2012-05-08 14:56:40
  152 2012-05-16 14:43:46
  5   2012-05-17 16:26:31
  29  2012-05-18 14:55:33
  </code></pre>
  
  <p>But the result array the tot alias don't exist!!</p>
  
  <p>The Question is:</p>
  
  <p>How i set ResultSetMapping correctly for <strong>count(id)</strong>?</p>