Not directly, but with a behavior I did it...
In the conditions instead of using
'local'=>'Cascavel - PR'
My behavior check if is a virtualfield and turns the condition query into
this:
"CONCAT({$this->alias}.city,' - ',{$this->alias}.state)"=>"Cascavel - PR"
for example,
Em quinta-feira, 5 d
You cannot search a virtualField... it is virtual.
You'll have to search the columns directly.
On Thu, Dec 5, 2013 at 3:17 AM, André Luis wrote:
> Hi everyone, i have a table "clients" wich the model is "Client"... and in
> my table I have the fields "city" and "state" and others... Also I have
Hi everyone, i have a table "clients" wich the model is "Client"... and in
my table I have the fields "city" and "state" and others... Also I have the
following virtualfield:
public $virtualFields = array(
'local'=>"CONCAT(Client.city,' - ',Client.state)",
);
When i use a find "all" with the