private function formatQueryElementAttr($key, $value, EntityMetadata $metadata, Store $store)
    {
        if (null === $attrMeta = $metadata->getAttribute($key)) {
            return;
        }

        $converter = $this->getQueryAttrConverter($store, $attrMeta);

        if (is_array($value)) {

            if (true === $this->hasOperators($value)) {
                return [$key, $this->formatQueryExpression($value, $converter)];
            }

            if (in_array($attrMeta->dataType, ['array', 'object'])) {
                return [$key, $value];
            }
            return [$key, $this->formatQueryExpression(['$in' => $value], $converter)];
        }
        return [$key, $converter($value)];
    }