Hi,
How can I map a native SQL query like the following?
Code:
select
a.id as ID
a.qty as Quantity
a.cal as Calories
b.name as Object_1
c.name as Object_2
from
objHead a,
Fruits b,
Sweets c
where
a.id = b.id
and a.id = c.id
How can I map a resultset like this into a class Items which has:
Quote:
public class Items{
private String id;
private String Quantity;
private String Calories;
private String Object_1;
private String Obejct_2;
// getter and setter mathdos
....
}
I do not want to map 3 tables, I do not care about them, I need only the recordset and display results on my webpage.
Any help?
thanks