title: How fetch record in Hibernate One to Many relationship
body: <p>I have 2 POJO classes: <code>Ownerdetials</code> (Parent table)
  and <code>Vehiclemaster</code> (Child table).
  I want to get all <code>oname</code> (means Ownername) which belong to <code>Vehicle</code> table.</p>
  
  <p>My classes:  </p>
  
  <p><strong>Ownerdetails.java:</strong></p>
  
  <pre><code>public class Ownerdetails  implements java.io.Serializable {
      private Integer ownerid;
      private String oname;
      private String panno;
      private String mobile;
      private String address;
      private String pincode;
      private String city;
      private String state;
      private String country;
      private String accno;
      private String bankname;
      private String branch;
      private String ifccode;
      private Set vehiclemasters = new HashSet(0);
      //Setter and Getter method 
   }
  </code></pre>
  
  <p><strong>Vehiclemaster.java:</strong></p>
  
  <pre><code>public class Vehiclemaster  implements java.io.Serializable {
      private Integer vid;
      private Ownerdetails ownerdetails;
      private String vno;
      private String vname;
      private String driverlicense;
      private String unladenWeight;
      private String drivername;
      private String vtype;
      private String inscompname;
      private String instype;
      private String insfrom;
      private String insto;
      private String fitnessdatefrom;
      private String fitnessdateto;
      //Setter and Getter Method
  }
  </code></pre>
  
  <p>Below is my SQL Query, how to convert in Hibernate HQL Query?</p>
  
  <pre><code>select ownerdetails.oname from ownerdetails,vehiclemaster 
  WHERE ownerdetails.ownerid=vehiclemaster.ownerid; 
  </code></pre>
  
  <p>I googled it, but did not get proper result.</p>