public function updateEntity(EntityInterface $entity)
    {
        $update = $this->getSql()->update();
        $update->set($this->getHydrator()->extract($entity));
        $update->where->equalTo($this->getPrimaryKey(), $entity->getIdentifier());

        try {
            $this->updateWith($update);
        } catch (RuntimeException $e) {
            return false;
        }

        return true;
    }