I've got the following model class:
class ContractDetails extends BaseContractDetails {
public function updateContractDetailsByConId($conId, $key, $value) {
$q = Doctrine_Query::create()
->update('ContractDetails');
if ($value === null) {
$q->set($key, 'NULL');
} else {
$q->set($key, '?', $value);
}
$q->where('cd_con_id = ?', $conId)
->execute();
return $q;
}
public function preUpdate($values) {
$test = "test";
}
}
What I want is to run some code before the "updateContractDetailsByConId" method row is updated. From my investigations I should be able to use the built in hooks i.e. preUpdate But the preUpdate method is never running.
Any ideas why not?