how we can use the computed field in where condition any idea?
suppose
$query = $this->table1
->find('all')
->select(['total_count' => '(SELECT count(*) FROM table2 where table2.fid = table1.id)'])
->autoFields(true)
->contain([
'table2', 'table3'
])
->where(['total_count >' 1]);
Column not found: 1054 Unknown column 'total_count' in where
is there way to to use computed field within where condition or how this issue can be resolved any alternate to this?