[jboss-jira] [JBoss JIRA] Created: (HIBERNATE-43) SQL native Request who respond only the first letter
Alexandre PETRILLO (JIRA)
jira-events at jboss.com
Thu Jul 20 04:15:11 EDT 2006
SQL native Request who respond only the first letter
----------------------------------------------------
Key: HIBERNATE-43
URL: http://jira.jboss.com/jira/browse/HIBERNATE-43
Project: Hibernate
Issue Type: Bug
Environment: Jboss 4.0.4 G.A. patch 1
Reporter: Alexandre PETRILLO
Assigned To: Steve Ebersole
I need to do some sql native query (to a data base Oracle 9i) from an EJB session Bean.
I use Jboss in version 4.0.4 G.A. patch 1
My simple code :
public List doNativeQueryMultiple(String sqlQuery) {
List list = manager.createNativeQuery(sqlQuery).getResultList();
return list;
}
This is some exemple for understand the probleme.
SELECT 'OUI' val FROM dual union SELECT 'NON' FROM dual Order BY 1 asc
Response is : O,N
SELECT 'TOTO' val FROM dual union SELECT 'NON' FROM dual Order BY 1 asc
Response is : TOTO,NON
SELECT 'TOT' val FROM dual union SELECT 'NON' FROM dual Order BY 1 asc
Response is : T,N
SELECT 'OUI' val FROM dual union SELECT 'abc' FROM dual Order BY 1 asc
Response is : O,a
SELECT 'OUI' val FROM dual union SELECT 'abcd' FROM dual Order BY 1 asc
Response is : OUI,abcd
SELECT 'OUI' val FROM dual union SELECT 'NON' FROM dual union SELECT 'TOT' FROM dual Order BY 1 asc
Response is : O,N,T
SELECT 'OUI' val FROM dual union SELECT 'NON' FROM dual union SELECT 'TOTO' FROM dual Order BY 1 asc
Response is : OUI,NON,TOTO
When the response of the request is correct, the return class type is java.lang.String
And when is incorrect , the return class type is java.lang.Charactere, and the response contain the first letter.
The bug is when the size of all of the selected string have the same length.
The test done by Jboss for determine the class return type maybe is wrong.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list