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

Gail Badner (JIRA) noreply at atlassian.com
Tue Dec 6 05:06:21 EST 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner resolved HHH-4108.
------------------------------

    Resolution: Duplicate
      Assignee: Gail Badner

> 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
>            Assignee: Gail Badner
>            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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list