In my case I want to run several conditions based on the current records relations:
public function beforeSave()
{
if($this->customer->type == '1') {
$this->type= '1';
}
}
Of course, the code above doesn’t work because $this is not referencing a real DB record and the AD relations fail. Hence, the attempted use of afterSave() to load the ‘real’ record and try to use AD relations for my conditions.
I’ll try to rethink my conditions in order to use beforeSave()