title: Searching with CDbCriteria
body: <p>Is there any way to make a CDbCriteria search (as in <code>compare()</code>) in the fields I'm selecting, but using the model's <code>search()</code> method instead of having to manually add the <code>compare()</code> conditions?</p>
  
  <p>Note that I'm aiming at a solution that will let me write some fewer lines, nothing more and nothing less. So, if the solution is something really hacky and/or mesy, I'll just go for the "add-a-few-compares()" method.</p>
  
  <p>My current code:</p>
  
  <pre><code>$criteria = new CDbCriteria;
  $criteria-&gt;with = array('A', 'B', 'C', 'D', 'E');
  
  $criteria-&gt;compare("A.field1", "test", false, 'OR');
  $criteria-&gt;compare("A.field2", "test", false, 'OR');
  $criteria-&gt;compare("B.field1", "test", false, 'OR');
  $criteria-&gt;compare("B.field2", "test", false, 'OR');
  
  $dataProvider = new CActiveDataProvider('Z', array(
      'criteria'=&gt;$criteria,
      //pagination...
      //more options...
  ));
  </code></pre>