operators in beforeFind changed in cake 1.2
Status: Beta
Brought to you by:
mgiglesias
In the current Cake Version all operators used in conditions moved to the 'key' side. So you have to change the before find method and move the operators to get the behavior working correctly.
Here I have the correct code (if statement in the beforeFind):
if (is_string($queryData['conditions']))
{
$queryData['conditions'] = $Db->name($Model->alias) . '.' . $Db->name($this->__settings[$Model->alias]['field'] . ' !=') . '1 AND ' . $queryData['conditions'];
}
else
{
$queryData['conditions'][$Model->alias . '.' . $this->__settings[$Model->alias]['field'] . ' !='] = '1';
}