Fixing SQL syntax error regression when entity type is a parameter with the entity search API