Hi,
i have been learning Hibernate for the couple of days and trying to create a sample application
but have stumbled onto an issue for which i couldn't find any answers( even after searching the forums).
Problem:
the following query joins two tables and return the results.
Code:
List l3 = s.createQuery("from Student as stud inner join stud.standard as std").list();
Hibernate Query executed at the backendCode:
select student0_.id as id0_0_, standard1_.id as id3_1_, student0_.studentId as studentId0_0_, student0_.name as name0_0_, student0_.age as age0_0_, student0_.gender as gender0_0_, student0_.standard as standard0_0_, standard1_.classId as classId3_1_, standard1_.standard as standard3_1_, standard1_.section as section3_1_ from Students student0_ inner join standards standard1_ on student0_.standard=standard1_.id
Now my issue is how to iterate though the result obtained ?i cannot cast the list to particular domain object as it returns data from both the entities.
please help!