How to use sum function in where condition using cakephp
<p>Hello I am trying to make a query where I need to pass sum function in where conditions. Below is the query. </p>

<pre><code>$this-&gt;Transaction-&gt;virtualFields['total_amount'] = 'sum(total_amount)';
$this-&gt;paginate = array('conditions'=&gt;$conditions,'order' =&gt; 'Transaction.title ASC', 'limit' =&gt; '15','group'=&gt;'Transaction.order_id');
</code></pre>