title: Magical Record : sum aggregation
body: <p>I'm doing an aggregation on entities and the code is :</p>
  
  <pre><code> NSPredicate *betweenInterval = [NSPredicate predicateWithFormat:@"(date &gt;= %@) AND (date &lt; %@)", [interval.start value], [interval.end value]];
  
   NSNumber * nbPoints = [OMSPointsEventEntity MR_aggregateOperation:@"sum:" onAttribute:@"nbPoints" withPredicate:betweenInterval];
  
   return [nbPoints intValue];
  </code></pre>
  
  <p>And NbPoints is nil, I don't know why...</p>
  
  <p>Hint : attribute NbPoints on my entity is a NSNumber should it be an int ?</p>