Rajamohan Sugumaran
Rajamohan Sugumaran

Reputation: 4499

Hibernate hql inner join

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.

Upvotes: 1

Views: 8207

Answers (1)

Saher Ahwal
Saher Ahwal

Reputation: 9237

Read this about Hibernate HQL Inner Join implementation

Upvotes: 2

Related Questions