title: Magento distinct(true) clause ignored
body: <p>Using the following code:</p>
  
  <pre><code>$collection = Mage::getModel('custom/custom')
      -&gt;getCollection()
      -&gt;distinct(true)
      -&gt;addFieldToSelect('brand')
      -&gt;load();
  </code></pre>
  
  <p>I've found the distinct is being ignored in 1.4.2, exactly the same code in 1.8.1 is working as I would expect (returning a single entry for each brand). </p>
  
  <p><strong>1.4.2 result:</strong></p>
  
  <pre><code>"Ace"
  "Ace"
  </code></pre>
  
  <p><strong>1.8.1 result:</strong></p>
  
  <pre><code>"Ace"
  </code></pre>
  
  <p>For myself I notice that 1.4.2 is returning an array of all fields from the model for each object , rather than just the one specified in the select (brand) as 1.8.1 does. I think this is what's causing the problem the distinct is included in the SELECT on both versions - in fact the SELECT statements are identical across versions. </p>
  
  <p>Is there a way to get a distinct result for a single field in older versions of Magento?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Based on the discussion below with liyakat my final solution was:</p>
  
  <pre><code>$collection = Mage::getModel('custom/custom')
      -&gt;getCollection()
      -&gt;distinct(true)
      -&gt;addFieldToSelect('brand')
      -&gt;setOrder('brand', 'ASC');
  
  $collection-&gt;getSelect()-&gt;group('brand');
  $collection-&gt;load();
  </code></pre>