[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4108) Invalid result in native query

Oleksandr Fedorenko (JIRA) noreply at atlassian.com
Wed Aug 26 11:14:15 EDT 2009


Invalid result in native query
------------------------------

                 Key: HHH-4108
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4108
             Project: Hibernate Core
          Issue Type: Bug
    Affects Versions: 3.3.2
         Environment: 3.3.2, MySQL 5.1
            Reporter: Oleksandr Fedorenko
            Priority: Critical


We have the native query executed with entity manager, example :

Query query = entityManager.createNativeQuery(sqlString);
List result = query.getResultList();

The returned result is an array of objects that has projection values.

When table column has type CHAR(N) , the result value is always instance of java.lang.Character and here we have only first character of database field and the rest characters are lost.
It is supposed to have result of java.lang.String class here.

When the column is altered to VARCHAR(N), the result is java.lang.String.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list