public function save()
{
/* @var $field Field */
//NOTE: hack for partial encryption, todo: think about improvement of this
if (in_array($this->name, static::listEncryptedFields())) {
$field = $this->getIterator()->fields()['value'];
$prevType = $field->getType();
$field->setType(new EncryptedType($field));
}
parent::save();
if (isset($field)) {
$field->setType($prevType);
}
}