title: CakePHP: group items and show last id instead of first
body: <p>I have a database table with items like:</p>
  
  <pre><code>| id | name  | created             | modified            |
  ----------------------------------------------------------
  | 10 | test1 | 2014-11-27 14:05:39 | 2014-11-27 14:05:39 |
  | 11 | test1 | 2014-11-28 14:05:39 | 2014-11-28 14:05:39 |
  | 12 | test2 | 2014-11-28 14:05:39 | 2014-11-28 14:05:39 |
  </code></pre>
  
  <p>I want to group the items by name and only show the last ID of the grouped values. But whatever I try, the first ID is always shown. In this example I want ID's 11 and 12 as output, but items 10 and 12 are shown. Maybe this is a problem with pagination?</p>
  
  <p>This is the query I am running:</p>
  
  <pre><code>$this-&gt;paginate = array(
      'limit' =&gt; 20,
      'order' =&gt; array('created' =&gt; 'DESC'),
      'group' =&gt; array('name')
  );
  </code></pre>
  
  <p>But even with ASC the output stays the same...</p>