I have model class like this
/**
* @property integer $is_active
*/
class User extends CActiveRecord {
....
}
$User = User::model()->findByPk(1);
In mysql is_active
is always return 1
or 0
, i want whenever i call $User->is_active
.
It will output boolean
not integer
.
How to do that behavior?