We noticed that our recursive CTE query returns incomplete results because it does not return the whole hierarchy. We already created the Jira issue [https://hibernate.atlassian.net/browse/HHH-16465|https://hibernate.atlassian.net/browse/HHH-16465|smart-link] where a fix was implemented in Hibernate 6.2.4, but it still didn’t fix the problem in our environment.
When adding our unit test locally in the hibernate-orm project it passed, while it failed in our environment. I quickly suspected the collation as the culprit and indeed: Hibernate testing uses “SQL_Latin1_General_CP1_CI_AS” while we are using “Latin1_General_CI_AS”.
When running the test you added ({{CteCycleTests#testRecursiveCycleClause}}) in a database with the collation “Latin1_General_CI_AS” it fails as well.
Additional information: The test {{CountExpressionTest#testCountDistinctTupleSanity}}fails as well using this collation. It’s also related to char(0). |
|