public function updateObject($values = null)
 {
     $object = parent::updateObject($values);
     if ($parent_id = $this->getValue('parent_id')) {
         $parent = $object->getTable()->find($parent_id);
         $object->setParent($parent);
     }
     return $object;
 }
 protected function doBind(array $values)
 {
     $values['parent_id'] = $this->getOption('parent')->getId();
     parent::doBind($values);
 }