title: Core Data group by AND sort
body: <p>I've made a core data query to sum cost grouped by 3 columns (npi, po, and nit)</p>
  
  <pre><code>NSExpressionDescription* ex = [[NSExpressionDescription alloc] init];
  [ex setExpression:[NSExpression expressionWithFormat:@"@sum.ce"]];
  [ex setExpressionResultType:NSDecimalAttributeType];
  [ex setName:@"sum"];
  
  [fetchRequest setPropertiesToFetch:[NSArray arrayWithObjects:@"npi",@"po", @"nit", ex, nil]];
  [fetchRequest setPropertiesToGroupBy:[NSArray arrayWithObjects:@"npi",@"po", @"nit", nil]];
  [fetchRequest setResultType:NSDictionaryResultType];
  </code></pre>
  
  <p>Which works perfectly.</p>
  
  <p>But I would like to sort the sum column and If I use a "classic" NSSortDescriptor:</p>
  
  <pre><code>[fetchRequest setSortDescriptors:[NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"sum" ascending:YES]]];
  </code></pre>
  
  <p>It doesn't work since <code>sum</code> is not in the BMA entity</p>