MK (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMzgzODRhZTVh...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16945?atlOrigin=eyJpIjoiMzgzOD...
) HHH-16945 (
https://hibernate.atlassian.net/browse/HHH-16945?atlOrigin=eyJpIjoiMzgzOD...
) CTE query cycle attribute evaluated incorrectly on MSSQL using collation
"Latin1_General_CI_AS" (
https://hibernate.atlassian.net/browse/HHH-16945?atlOrigin=eyJpIjoiMzgzOD...
)
Issue Type: Bug Affects Versions: 6.2.6 Assignee: Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) Components: hibernate-core Created: 17/Jul/2023 04:18 AM Environment: SQL Server 2022
with Collation Latin1_General_CI_AS Priority: Major Reporter: MK (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
)
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 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.
(
https://hibernate.atlassian.net/browse/HHH-16945#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16945#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100232- sha1:33a7c72 )