P
Peter Horlock
Hi,
I have a sql statement joining over various tables. For performance
reasons (~100000 results) I want to fill the direct result into a
Pojo, without referencing any other tables / Pojos. If possible, I
would like to go without HQL.
The simplified statement looks like that:
select e.name, d.depName from employee e join deparment d on (e.depNo
= d.depNo).
The simplied Pojo looks like this:
MyPojo
- employeeName
- deparmentName
How can I fill results of several joined tables into the same Pojo?
Currently I am using
<return-scalar column="name" type="string"/>
<return-scalar column="depName" type="string"/>
To improve performance I want to use a ScrollableResult, which again I
want to encapsulate into a Iterable, so that I can easily iterate over
its elements. However this will only work on a pojo not on a set of
single values.
Any idea how I could get this done?
Thanks,
Peter
I have a sql statement joining over various tables. For performance
reasons (~100000 results) I want to fill the direct result into a
Pojo, without referencing any other tables / Pojos. If possible, I
would like to go without HQL.
The simplified statement looks like that:
select e.name, d.depName from employee e join deparment d on (e.depNo
= d.depNo).
The simplied Pojo looks like this:
MyPojo
- employeeName
- deparmentName
How can I fill results of several joined tables into the same Pojo?
Currently I am using
<return-scalar column="name" type="string"/>
<return-scalar column="depName" type="string"/>
To improve performance I want to use a ScrollableResult, which again I
want to encapsulate into a Iterable, so that I can easily iterate over
its elements. However this will only work on a pojo not on a set of
single values.
Any idea how I could get this done?
Thanks,
Peter