title: Hibernate inner join using hql
body: <p>I am new to Hibernate.  I have two tables, e.g., <code>student</code> and <code>phone number</code> and these two tables have a common column, <code>student id</code>.
  I want to do an inner join with these two tables using Hibernate hql. </p>
  
  <p><strong>student.java</strong> </p>
  
  <pre><code>{
     private int id;   
     private String name;   
  }
  </code></pre>
  
  <p><strong>phone.java</strong></p>
  
  <pre><code>{
     private int pid;
     private int sid;  //same id in student.java 
     private int phone_number;
  }
  </code></pre>