setter not dispatch


I’m trying to create a setter method for my model and try to call it from my controller:

in controller file:

$_model = $this->loadModel();

$_model->etnia = 19;


in model file:

   protected function setEtnia()




So…, the setter method is not fired when 19 is assigned to “etnia” field. I’ve achieved it only if I create this overriding __set() method in model file:

public function __set($name,$value)









Then, the setEtnia() method is fired.

What am I doing wrong??

This is by design. Database fields should be handled in validators for validation or in beforeX/afterX methods for modification.

// See here for explanation from core developer.