views:

383

answers:

0

Hi

I am facing data truncation issue with hibernate for DB2 Char datatype. I am getting only the first character for DB2 char datatype using hibernate.

I looked through the net and got two threads with similar issues.

These two threads mentions either to modify the dialect or cast as char in sql query.

below are the two similar threads.

https://forums.hibernate.org/viewtopic.php?f=1&t=960949&sid=547d1bf3ee5d3370965eed7d348b6fd9 --- they are saying this as a bug.

ahttp;//opensource.atlassian.com/projects/hibernate/browse/HHH-2304.

The problem for me is that i have a named query where i am not able to cast as char. Can somebody tell me how to get the correct data using named query in hbm file?

Thanks!