public function updateObject($values = null)
 {
     if (is_null($values)) {
         $values = $this->values;
     }
     $photo = $values['photo'];
     unset($values['photo']);
     $object = parent::updateObject($values);
     if ($photo) {
         $file = new File();
         $file->setFromValidatedFile($photo);
         $old = $this->getObject()->getFile();
         $this->getObject()->setFile($file);
         $this->getObject()->save();
         $old->delete();
     }
     return $object;
 }