public function getProviderId()
    {
        $id = $this->getAttribute('providerId');
        if (null === $id && null !== $this->provider) {
            $id = $this->provider->id;
            $this->setAttribute('providerId', $id);
        }

        return $id;
    }