I have a test case here: https://github.com/archiecobbs/hibernate-test-case-templates/tree/time-concat-bug
A criteria API query containing this logic fails:
The code is saying "invoke the FORMATDATETIME() function with two arguments, then concatenate the result with an empty string".
But what the SQL query says is "invoke the FORMATDATETIME() function with the concatenation of two arguments, then concatenate the result with an empty string".
This is obviously wrong, and in this case it causes the SQL compilation to fail because FORMATDATETIME() requires at least two arguments:
Thanks for the complete bug reporting. The root cause turns out to be some code sloppiness. A PR has been created at
Wow, thanks for the quick turnaround!!
Usually it seems my Hibernate bugs are completely ignored, e.g. , , .
I will tend to them next week.
Now all your above tickets have been fixed. Enjoy your high-quality bug reporting pretty much! They help to improve the Criteria feature dramatically.
Thanks, glad to help.