generateAlias method of the net.sf.hibernate.loader.Loader uses toLowerCase() when generating class aliases. Since the toLowerCase() makes conversion by using the default system locale, some non-English locales (e.g. Turkish) cause improper alias generation.
For example, when the default system locale is set to Turkish (tr_TR), letter 'I' is converted to 'dotless i', instead of 'i'. Because of this, generated aliases and the sql statements which depend on these aliases contain wrong characters.
In order to prevent this situation, replacing toLowerCase() with toLowerCase(Locale.US) explicitly determines which locale will be used during the conversion.