Message:
The following issue has been closed.
Resolver: Max Rydahl Andersen
Date: Sat, 27 Sep 2003 7:07 PM
Fixed in cvs
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-353
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-353
Summary: query.setProperty( Object ) assumes HQL
Type: Bug
Status: Closed
Priority: Major
Resolution: FIXED
Project: Hibernate2
Components:
core
Fix Fors:
2.1
Versions:
2.1
Assignee: Max Rydahl Andersen
Reporter: Christopher D Riccio
Created: Mon, 22 Sep 2003 12:58 PM
Updated: Sat, 27 Sep 2003 7:07 PM
Environment: DB2 Database
Description:
Here's what I have.
QUERY
select {d.*}
from department {d}
where {d}.deptno = :deptno
passing in an object (Department) which has a
private String deptno;
on it.
Getting the following Exception:
net.sf.hibernate.QueryException: in expected: {d} [select {d.*}
from department {d}
where {d}.deptno = :deptno]
{d} is defined in my query object.
When I do
Query.setString( "deptno", department.getDeptno() );
The query executes correctly.
After looking deeper into this.
Seems as if it is handling the Native sql call as HQL.
The query dies after parsing "department."
it's expecting a class path, ( saw indexOf( '.' ) so I assume that is what was going on). Then it sets expectingIn to true. The next thing it sees is {d} and it chokes on it.
---------------------------------------------------------------------
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
|