Message:
The following issue has been re-assigned.
Assignee: Max Rydahl Andersen (mailto:xa...@xa...)
Assigner: Gavin King (mailto:ga...@in...)
Date: Tue, 23 Sep 2003 9:38 AM
Comment:
Max, the problem is in AbstractQueryImpl. Would you please take a look?
TIA.
---------------------------------------------------------------------
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: Assigned
Priority: Major
Project: Hibernate2
Components:
core
Versions:
2.1
Assignee: Max Rydahl Andersen
Reporter: Christopher D Riccio
Created: Mon, 22 Sep 2003 12:58 PM
Updated: Tue, 23 Sep 2003 9:38 AM
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
|