Java – Hibernate hql inner join

hibernatehqlinner-joinjakarta-eejava

Hi am newbie to hibernate..
I have two tables like student and phone number these two tables had a common column as student id.i want do inner join with these two table using Hibernate hql.

My Code :

student.java 
{
   private int id;   
   private String name;    
}

phone.java
{
    private int id;
    private int sid;//same id in student.java 
    private int phone_number;
}

I want hql query using inner join,student.hbm.xml and phone.hbm.xml .
Thanks in advance.

Best Answer