Doctrine\ODM\MongoDB\Mapping\ClassMetadataInfo::isSingleValuedReference PHP Method

isSingleValuedReference() public method

Checks whether the class has a mapped association for the specified field and if yes, checks whether it is a single-valued association (to-one).
public isSingleValuedReference ( string $fieldName ) : boolean
$fieldName string
return boolean TRUE if the association exists and is single-valued, FALSE otherwise.
    public function isSingleValuedReference($fieldName)
    {
        return isset($this->fieldMappings[$fieldName]['association']) && $this->fieldMappings[$fieldName]['association'] === self::REFERENCE_ONE;
    }
ClassMetadataInfo