src/Search/QueryBuilder.php
protected function isDoctrineAssociation(ClassMetadata $classMetadata, $fieldName)
    {
        if (null === $fieldName) {
            return false;
        }

        $fieldNameParts = \explode('.', $fieldName);

        return false !== \strpos($fieldName, '.') && !\array_key_exists($fieldNameParts[0], $classMetadata->embeddedClasses);
    }
protected function isDoctrineAssociation(ClassMetadata $classMetadata, $fieldName)
    {
        if (null === $fieldName) {
            return false;
        }

        $fieldNameParts = \explode('.', $fieldName);

        return false !== \strpos($fieldName, '.') && !\array_key_exists($fieldNameParts[0], $classMetadata->embeddedClasses);
    }
Checking if the field name contains a '.' is not enough to decide if it's a
Doctrine association. This also happens when using embedded classes, so the
embeddedClasses property from Doctrine class metadata must be checked too.

@param ClassMetadata $classMetadata
@param string|null   $fieldName

@return bool