I know its been a bit of a whole since my last update but have a bit of useful info here:
function beforeFind(&$queryData)
{
$conditions = $queryData['conditions'];
if (!is_array($conditions)) {
if (!$conditions) {
$conditions = array();
} else {
$conditions = array($conditions);
}
}
if (!isset($conditions['active']) && !isset($conditions[$this->alias . '.active'])) {
$conditions[$this->alias . '.active'] = 1;
}
$queryData['conditions'] = $conditions;
return true;
}
Put this in the model that you have an ‘active’ field in and it will save you having to add a condition into each find statement to check whether that record is flagged as active / inactive!