Monday, 26 August 2013

how to parse results of joint query in hibernate

how to parse results of joint query in hibernate

In my project I have 2 beans (Demande & Candidat ), and I want to execute
a join query with Hibernate like this:
String squery="select d.date_demande, c.nom, c.prénom from Demande d ,
Candidat c where d.id_candidat=c.id_candidat";
SQLQuery query=session.createSQLQuery(squery);
The issue is that I don't know which object this query returns. I want to
put the result of this query in a list so I can use it in a jsp file
easily.

No comments:

Post a Comment