core
core copied to clipboard
OrderBy Alias don't recognize doctrine function
API Platform version(s) affected: 2.6.8
Description
I use a doctrine function in my orderBy but the queyBuilder not recognize it.
->addOrderBy("JSON_GET_FIELD_AS_INTEGER(usuggest.jScores,'{$alpha}')", 'DESC')
I have this error code : The alias "JSON_GET_FIELD_AS_INTEGER(usuggest" does not exist in the QueryBuilder.
How to reproduce
Add a string fucntion in orderBy in extension file.
Possible Solution
Update the QueryChecker.php to recongnize functions.