SQLServer2005Dialect.getLimitString turns tablenames to lowercase -> SQLGrammarException: when mapping tables with capital letters

Description

Usually when annotating entity classes without the @Table.name attribute, then the default mapped tablenames begin with a capital letter.
When using the paging feature, SQLServer2005Dialect.getLimitString turns the whole sql to lowercase

SQLServer2005Dialect.java

thus also the included tablenames are all converted to lowercase,
this leads to following schema mismatch exception, when using the original SQLServerDriver:
org.hibernate.exception.SQLGrammarException: Invalid object name 'mytable'

This bug was introduced with (ROW_NUMBER for Paging).

Testcase:

Environment

Hibernate4, SQLServer2008

Assignee

Strong Liu

Reporter

Guenther Demetz

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure