1

I am using Native hibernate query to get data from database.

here is my code

String sqlQuery="select * from testTable"
Query query = informixSessionFactory.getCurrentSession()
                    .createSQLQuery(sql);
List test=query.list();

It executes fine but when i checks the value in list i found that it takes the datatype as character insted of String, It displays first character only. please help

Abhijit
  • 673
  • 2
  • 17
  • 35
  • `i found that it takes the datatype as character insted of String` ?? Where it is taking ? – Suresh Atta Dec 07 '13 at 11:24
  • i gets the result in list in that list there on every column where the String should be there. it gives me character – Abhijit Dec 07 '13 at 11:35
  • See http://stackoverflow.com/questions/4873201/hibernate-native-query-char3-column – axtavt Dec 07 '13 at 11:36
  • thanks @axtavt i think its solution for Oracle I am using Informix. I have same problem but that solution didn't worked for me – Abhijit Dec 07 '13 at 12:14
  • I do have the same issue- hibernate get returns partial string, i have used 'text' datatype in my mysql db is there any possibilities of issue due to usage of datatype text? – Akhil S Kamath Mar 07 '17 at 05:15

0 Answers0