Max,
Thanks for the info.
I did look at the documentation, but not deep enough. I actually only looked at 7.3.6 which talks a little about native sql queries but mentions nothing about being required to bring everything back. I thought that was all you guys put in there. After looking again, I noticed that you guys had another section on it which explained what you did. I apologize.
After meeting with other key members of my team, we have decided that we will make custom persistant objects to handle the queries. Thank you for the link you gave me. The link actually led me to a blank page, but I looked it up in the doc.
I would like to run something by you.
If I had something like...
Code:
select e.emp_id, e.emp_name, d.dept_id, d.dept_name
from employee e, department d
where d.dept_id = ?
and e.dept_id = d.dept_id
would I be able to do something like ... make one object to handle the query.
Code:
public class DepartmentEmployees {
private int empId;
private String empName
private int deptId
private String deptName
}
with the appropriate mapping, if it is possible to map one object to 2 different tables.
Or am I making 2 different "sub"classes... one for dept and one for emp?
From the structure, I am assuming that I have to make 2 different subclasses, but I thought I would ask and see.
Also, I realize that the SQLQueries are new to Hibernate with this version. Are there plans in the future to handle what I was asking about... handling queries that don't return all columns of a table?
Thanks again for the info,
Chris