I have public fields in my CActiveRecord|ActiveRecord public $field1.
On controller, I call the model by $id, assign my public field a value and returns JSON.
$vacinated = …some computed value;
$my_person = Matching::model()->findByPk( $id);
$my_person->field1= $vacinated;
When I return $my_person as a JSON I can’t access the public $field1 and its not visible in the JSON file.
how do I resolve this?