Locale issue with the generated class alias name

Description

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.

Environment

Hibernate 2.2

Assignee

Emmanuel Bernard

Reporter

RehaR

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Time tracking

1m

Components

Priority

Major
Configure