Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-204
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-204
Summary: Problem with Query and LIMIT (HSQL)
Type: Bug
Status: Unassigned
Priority: Major
Project: Hibernate2
Components:
core
Versions:
2.0.1
Assignee:
Reporter: Sebastien Guimont
Created: Thu, 17 Jul 2003 9:15 AM
Updated: Thu, 17 Jul 2003 9:15 AM
Description:
Reference: http://sourceforge.net/forum/message.php?msg_id=2086382
I use HyperSQL 1.7.2 alpha M.
/** Code sampl **/
hibernateSession = getSession(session);
Query hibernateQuery = hibernateSession.createQuery(query);
for (int i = 0; i < params.length; i++) {
hibernateQuery.setParameter(i, params[i]);
}
hibernateQuery.setFirstResult(startRow);
hibernateQuery.setMaxResults(resultSize);
results = hibernateQuery.list();
/** Exception **/
When I call the list method I got this exception:
Could not execute query: Wrong data type: LIMIT n m in statement [select limit 'CA' 1 referenceValue.REF_VAL_ID as REF_VAL_ID, referenceValue.CITY_CNTRY_ID as CITY_CN11_, referenceValue.CITY_STATEPROV_ID as CITY_ST12_, referenceValue.UPID as UPID, referenceValue.CD as CD, referenceValue.CREATED as CREATED, referenceValue.CREATED_BY as CREATED_BY, referenceValue.LAST_UPD as LAST_UPD, referenceValue.LAST_UPD_BY as LAST_UPD8_, referenceValue.REF_ORDER as REF_ORDER, referenceValue.DESC_ID as DESC_ID from REF_VAL referenceValue, REF_VAL countryr0_, DESCRIPT descript1_ where referenceValue.TYP='SYS_CITY' and referenceValue.DESC_ID=descript1_.DESC_ID and (((countryr0_.CD=25 and referenceValue.CITY_CNTRY_ID=countryr0_.REF_VAL_ID))) order by descript1_.DEFAULT_DESC asc]
It looks like the parameters list for the prepared statement are not ordered correctly.
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|