public function update(EntityInterface $entity)
    {
        if (!is_a($entity, $this->getEntityClass())) {
            throw new Exception('The given entity (' . get_class($entity) . ') is not compatible with this data source (' . self::class . '.');
        }
        
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $em->flush();
            
            return true;
        } catch (\Exception $e) {
            throw new Exception('Cannot update the entity"' . $entity . '".', 0, $e);
        }
    }
public function update(EntityInterface $entity)
    {
        if (!is_a($entity, $this->getEntityClass())) {
            throw new Exception('The given entity (' . get_class($entity) . ') is not compatible with this data source (' . self::class . '.');
        }
        
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $em->flush();
            
            return true;
        } catch (\Exception $e) {
            throw new Exception('Cannot update the entity"' . $entity . '".', 0, $e);
        }
    }
public function update ( EntityInterface $ entity ) { if ( ! is_a ( $ entity , $ this -> getEntityClass ( ) ) ) { throw new Exception ( 'The given entity (' . get_class ( $ entity ) . ') is not compatible with this data source (' . self :: class . '.' ) ; } try { $ em = $ this -> entityManager -> getDoctrineEntityManager ( ) ; $ em -> flush ( ) ; return true ; } catch ( \ Exception $ e ) { throw new Exception ( 'Cannot update the entity"' . $ entity . '".' , 0 , $ e ) ; } }
Updates the entity. Returns true if everything worked as excepted or
false if the update didn't worked.

@param \Zepi\DataSource\Core\Entity\EntityInterface $entity
@return boolean

@throws \Zepi\DataSource\Doctrine\Exception The given entity is not compatible with this data source.
@throws \Zepi\DataSource\Doctrine\Exception Cannot update the entity "{entity}".
Updates the entity . Returns true if everything worked as excepted or false if the update didn t worked .