public function updateEntry(MotivationEntry $e)
 {
     try {
         $db = $this->entryDao->find($e->getId());
         if ($db !== null) {
             $db->fromArray($e->toArray());
             $db->setUpdated(new DateTime());
             $this->entryEditorTypeHandle($db);
             $this->entryOwnerTypeHandle($db);
             $this->entrySeasonTypeHandle($db);
             $this->entityManager->merge($db);
             $this->entityManager->flush();
             $this->invalidateEntityCache($db);
             $this->onUpdate($db);
         }
     } catch (DuplicateEntryException $ex) {
         $this->logWarning($ex->getMessage());
     } catch (\Exception $ex) {
         $this->logError($ex->getMessage());
         throw new Exceptions\DataErrorException($ex->getMessage(), $ex->getCode(), $ex->getPrevious());
     }
 }