In hibernate I can do following
Query q = session.createQuery(\"from Employee as e); List emps = q.list();
Now if I want to
You will get a list of arrays of Objects (each one with two elements)
Object
List< Object[] > employees = q.list(); for ( Object[] employee : employees ) { // employee[0] will contain the first name // employee[1] will contail the ID }