| Hi Jeremy Carnus, Sorry for the delay. So, 2 things:
- I think it would be interesting to understand why the query is not rendered correctly. AFAIK, the rendering should be made in SubstringFunction#render() and for the function it should be in ParameterizedFunctionExpression. That should generate the JPQL. First thing is to check the generated JPQL is OK. Then it's going to be parsed and a SQL query will be generated from JPQL - the issue might be there too - not too sure about where to add a breakpoint for this though so let's first check the JPQL (it might be an issue with the Antlr parser, in which case, it might not be that much fun). Adding breakpoints there should help to understand what is wrong (and if the missing parameters are the ones from the substring or the function); I think, even if we add the function to the dialect, we should try to understand what's wrong here.
- if your function is a valid function for the dialect, then it makes sense to add it to the dialect. You need to be careful though and try to check in which version the function has been added so that we add it in the right dialect version. Note that the functions we declare in the dialects are really outdated for most dialects so feel free to contribute.
Thanks! |
|