public function getParentMetadataForProperty($baseClass, $propertyFullName)
    {
        $nameElements = explode('.', $propertyFullName);
        $lastPropertyName = array_pop($nameElements);
        $class = $baseClass;
        $parentAssociationMappings = [];

        foreach ($nameElements as $nameElement) {
            $metadata = $this->getMetadata($class);
            $parentAssociationMappings[] = $metadata->associationMappings[$nameElement];
            $class = $metadata->getAssociationTargetClass($nameElement);
        }

        return [$this->getMetadata($class), $lastPropertyName, $parentAssociationMappings];
    }
public function getParentMetadataForProperty($baseClass, $propertyFullName)
    {
        $nameElements = explode('.', $propertyFullName);
        $lastPropertyName = array_pop($nameElements);
        $class = $baseClass;
        $parentAssociationMappings = [];

        foreach ($nameElements as $nameElement) {
            $metadata = $this->getMetadata($class);
            $parentAssociationMappings[] = $metadata->associationMappings[$nameElement];
            $class = $metadata->getAssociationTargetClass($nameElement);
        }

        return [$this->getMetadata($class), $lastPropertyName, $parentAssociationMappings];
    }
public function getParentMetadataForProperty ( $ baseClass , $ propertyFullName ) { $ nameElements = explode ( '.' , $ propertyFullName ) ; $ lastPropertyName = array_pop ( $ nameElements ) ; $ class = $ baseClass ; $ parentAssociationMappings = [ ] ; foreach ( $ nameElements as $ nameElement ) { $ metadata = $ this -> getMetadata ( $ class ) ; $ parentAssociationMappings [ ] = $ metadata -> associationMappings [ $ nameElement ] ; $ class = $ metadata -> getAssociationTargetClass ( $ nameElement ) ; } return [ $ this -> getMetadata ( $ class ) , $ lastPropertyName , $ parentAssociationMappings ] ; }
Returns the model's metadata holding the fully qualified property, and the last
property name.

@param string $baseClass        The base class of the model holding the fully qualified property
@param string $propertyFullName The name of the fully qualified property (dot ('.') separated
property string)

@return array(
\Doctrine\ODM\MongoDB\Mapping\ClassMetadata $parentMetadata,
string $lastPropertyName,
array $parentAssociationMappings
)
Returns the model s metadata holding the fully qualified property and the last property name .