public function collectPrefetchReferences(ClassMetadata $class, NodeInterface $node)
    {
        $refNodeUUIDs = [];
        foreach ($class->referenceMappings as $fieldName) {
            $mapping = $class->mappings[$fieldName];
            if (!$node->hasProperty($mapping['property'])) {
                continue;
            }

            if ($mapping['type'] & ClassMetadata::MANY_TO_ONE
                && $mapping['strategy'] !== 'path'
            ) {
                $refNodeUUIDs[] = $node->getProperty($mapping['property'])->getString();
            }
        }

        return $refNodeUUIDs;
    }
public function collectPrefetchReferences(ClassMetadata $class, NodeInterface $node)
    {
        $refNodeUUIDs = [];
        foreach ($class->referenceMappings as $fieldName) {
            $mapping = $class->mappings[$fieldName];
            if (!$node->hasProperty($mapping['property'])) {
                continue;
            }

            if ($mapping['type'] & ClassMetadata::MANY_TO_ONE
                && $mapping['strategy'] !== 'path'
            ) {
                $refNodeUUIDs[] = $node->getProperty($mapping['property'])->getString();
            }
        }

        return $refNodeUUIDs;
    }
public function collectPrefetchReferences ( ClassMetadata $ class , NodeInterface $ node ) { $ refNodeUUIDs = [ ] ; foreach ( $ class -> referenceMappings as $ fieldName ) { $ mapping = $ class -> mappings [ $ fieldName ] ; if ( ! $ node -> hasProperty ( $ mapping [ 'property' ] ) ) { continue ; } if ( $ mapping [ 'type' ] & ClassMetadata :: MANY_TO_ONE && $ mapping [ 'strategy' ] !== 'path' ) { $ refNodeUUIDs [ ] = $ node -> getProperty ( $ mapping [ 'property' ] ) -> getString ( ) ; } } return $ refNodeUUIDs ; }
Gather all UUIDs to pre-fetch nodes in MANY_TO_ONE mappings.

@param ClassMetadata $class The metadata about the document to know what to do.
@param NodeInterface $node  The node to prefetch parent and childs for.

@return array List of UUID to fetch in one go.
Gather all UUIDs to pre - fetch nodes in MANY_TO_ONE mappings .