[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4104) SqlQuery : problems with constants under Oracle
christophe blin (JIRA)
noreply at atlassian.com
Fri Aug 21 05:00:17 EDT 2009
SqlQuery : problems with constants under Oracle
-----------------------------------------------
Key: HHH-4104
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4104
Project: Hibernate Core
Issue Type: Bug
Components: query-sql
Affects Versions: 3.2.6
Environment: At least Hibernate 3.2.6 and Oracle10g
Reporter: christophe blin
A "test case " is better than a long description :
List l = getSessionFactory().getCurrentSession().createSQLQuery("select 'abc' from dual").list();
System.out.println(l.get(0)); //expected 'abc' but is 'a' under Oracle
l = getJdbcTemplate().queryForList("select 'abc' from dual");
System.out.println(l.get(0));//to prove this really is an hibernate issue and not something else
Under Oracle 10g :
a
{'ABC'=abc}
Under mySQL 5.0.5 :
abc
{abc=abc}
So we can see that in both case, direct JDBC correctly returns 'abc' whereas using SqlQuery gives a bad result under oracle
--
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