public function preInsert($event) { parent::preInsert($event); if (!$this->get('value') && $this->get('default_value')) { $this->set('value', $this->get('default_value')); } }
public function preInsert($event) { parent::preInsert($event); if (!$this->value && $this->default_value) { $this->value = $this->default_value; } }