Erol Ozcan commented on Bug HHH-6769

I have found the root cause of the problem. GUI module of our application can be change default language to Locale.TURKISH due to user request. After that, some of jpql queries which includes "I" character aliases like "partyIdentification", started to broken.

I have changed toLowerCase() call in generateAliasRoot() method in org/hibernate/util/StringHelper.java to force use Locale.ENGLISH. Compiled the StringHelper.java and replaced it within orginal hibernate-core-3.3.2.GA.jar. Started our application with patched Hibernate.jar. At the end, our the problem has been solved.

I attached the patch "hibernate-core-3.3.2.GA-aliaspatch.patch" to this task. I think that toLowerCase(Locale.ENGLISH) change in generateAliasRoot() can be applied other hibernate version without any hassle.

Patch can be applied as

  • Download "hibernate-core-3.3.2.GA-aliaspatch.patch" and copy it to parent directory of your "hibernate-core-3.3.2.GA" source code directory.
  • Change your Hibernate source directory. e.g.: cd hibernate-core-3.3.2.GA
  • patch -p0 -i ../hibernate-core-3.3.2.GA-aliaspatch.patch

Can you apply this very small patch, toLowerCase(Locale.ENGLISH) change in generateAliasRoot(), to your Hibernate release in future releases? Thanks in advance.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira