title: Pagination in CakePHP with virtual fields does not return an empty array when there are no results
body: <p>I am using a virtual field in a model. That field represents the sum of several fields: <code>SUM(Model.amount_1 + Model.amount_2 + ...)</code>. This is the schema:</p>
  
  <pre><code>create table `current_transfers` (
    `id` integer unsigned not null auto_increment primary key,
    `description` varchar(1024) not null,
    `product_amount` decimal(13,2) default 0.0 not null,
    `tax_amount` decimal(13,2) default 0.0 not null,
    `other_amount` decimal(13,2) default 0.0 not null,
    `record_id` integer unsigned not null,
    constraint foreign key (`record_id`) references `records`(`id`) on delete cascade,
  ) ENGINE=InnoDB;
  </code></pre>
  
  <p>And this is the definition of the virtual field in <code>CurrentTransfer</code> model:</p>
  
  <pre><code>var $virtualFields = array(
    'amount' =&gt; 'SUM(
      CurrentTransfer.product_amount +
      CurrentTransfer.tax_amount +
      CurrentTransfer.other_amount)'
  );
  </code></pre>
  
  <p>Let's say the table does not have any records yet and you use <code>$this-&gt;paginate()</code> in <code>RecordsController</code> to retrieve a list of results, like this:</p>
  
  <pre><code>class RecordsController extends AppController {
  
    var $name = 'Records';
  
    var $paginate = array(
      'CurrentTransfer' =&gt; array(
        'order' =&gt; array('CurrentTransfer.amount' =&gt; 'desc'),
      ),
    );
  
    // ...
  
    public function view($id) {
      // ...
      $this-&gt;paginate('CurrentTransfer', array('CurrentTransfer.record_id' =&gt; $id));
      // ...
    }
  
    // ...
  }
  </code></pre>
  
  <p>I have found two different behaviors:</p>
  
  <ul>
  <li>If the virtual field is actually defined in the model the result is an array with one element storing an empty record, i.e. every field is set to <code>NULL</code>.</li>
  <li>If the virtual field is not defined in the model the result is an empty array, which is the common behavior in CakePHP when a query returns an empty set of values.</li>
  </ul>
  
  <p>I would always expect the second behavior, since is easier to compare if there are results or not.</p>
  
  <p>Why is CakePHP returning a fictitious result when there are actually no records in the table? Why the addition of virtual fields produce such behavior?</p>