public function collectPrefetchHierarchy(ClassMetadata $class, NodeInterface $node, $locale = null)
    {
        $prefetch = [];
        if ($class->parentMapping && $node->getDepth() > 0) {
            $prefetch[] = PathHelper::getParentPath($node->getPath());
        }
        foreach ($class->childMappings as $fieldName) {
            $childName = $class->mappings[$fieldName]['nodeName'];
            $prefetch[] = PathHelper::absolutizePath($childName, $node->getPath());
        }
        if ($locale && count($prefetch) && 'child' === $class->translator) {
            $prefetch[] = $node->getPath().'/phpcr_locale:'.$locale;
        }

        return $prefetch;
    }