public function updatePivot($entity)
    {
        $keyName = $this->relatedMap->getKeyName();

        $this->updateExistingPivot(
            $entity->getEntityAttribute($keyName),
            $entity->getEntityAttribute('pivot')->getEntityAttributes()
        );
    }