public static function getFormattedIdentifier(ClassMetadata $relatedClass, array $criteria, $fieldName, $value)
    {
        $isObject = \is_object($criteria[$fieldName]);

        return $isObject && null === $value
            ? self::formatEmptyIdentifier($relatedClass)
            : $value;
    }