Hi again Trish,
Rob Hills wrote:
Hi Trish,
Trish wrote:
Following error found while using following query
getHibernateTemplate().find("from Employee as emp where
emp.employeeId in "
+
"(select empproj.employeeId from EmployeesProject as
empproj " +
"where empproj.projectId=?)", projectId+")");
You are appending a right-parenthesis ")" to your projectId variable
so if your projectId is 12345, you are feeding 12345) in to your query
parameter.
IOW, the last line of your query string should read:
"where empproj.projectId=?)", projectId);
You may also find the query is easier to work with if you use the HQL
Object syntax rather than SQL, eg something like:
getHibernateTemplate().find("from Employee emp join
Employee.employeesProjects empProj where empProj.projectId = ?", projectId);
This page has some good examples of HQL:
http://www.hibernate.org/hib_docs/reference/en/html/queryhql.html
Finally, is there some reason that there are 3 or 4 copies of each of
your emails on the list?
HTH,
Rob Hills
Waikiki, Western Australia
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]