Hello,
I am currently working on a web projekt with the purpose of displaying data from a legacy database within a web application. The Database I am using is SAPDB version 7.5.0 . As I do only have to create read-only access to the legacy DB and show the result as simple HTML-Tables I didn' t write hibernate mapping files, but usednative SQL-Queries to retrieve the data.
I am using the AliasToEntityMapResultTransformer to create a "list of maps" that menas every row ist automaticaly transfered to a Map.
Now I have a strange problem concerning columns of type "CHAR". Only the first character of a char column is displayed. Example:
Table of legacy Database: CLIENT
Columns:
NAME Varchar(200)
CLIENTNO CHAR(3)
The native SQL Query:
SELECT NAME as "Name", CLIENTNO AS "CNO" FROM CLIENT
Testdata:
NAME: TEST plc
CLIENTNO: D21
The result of the Query is stored inside the Map:
Name: Test plc (That's OK)
CNO: D (Why only one Character instead of three? Why "D" instead of "D21"?)
This problem only occurs for the column type CHAR - all other types work perfectly...
I have ported the same example to MySQL 5.0 and everything works perfect!
Has anybody faced similar problems? Is there any solution?
Thank you in advance, Greetings
Aldan
Hibernate Version: 3.2.2 GA
|