public function handleHydrate(AbstractMappingEvent $event)
    {
        $document = $event->getDocument();

        if (!$document instanceof ShadowLocaleBehavior || !$event->getOption('load_shadow_content')) {
            return;
        }

        $node = $event->getNode();
        $locale = $this->inspector->getOriginalLocale($document);
        $shadowLocaleEnabled = $this->getShadowLocaleEnabled($node, $locale);
        $document->setShadowLocaleEnabled($shadowLocaleEnabled);

        if (!$shadowLocaleEnabled) {
            return;
        }

        $shadowLocale = $this->getShadowLocale($node, $locale);
        $document->setShadowLocale($shadowLocale);
        $event->setLocale($shadowLocale);
        $document->setLocale($shadowLocale);
    }