title: Left join using hibernate criteria
body: <p>I have two entity: <code>Issue</code> and <code>Issue_Tracker</code>. I am using Hibernate 3.6. </p>
  
  <pre><code>SELECT `issues`.`issue_id`,
         `issues`.`issue_raised_date`,
         `issues`.`issue_description`,
         `issue_tracker`.`tracker_status`
  FROM `issues`
     LEFT JOIN  `issue_tracker` ON `issues`.`issue_id` = `issue_tracker`.`issue_id`
  WHERE `issues`.`status`="Escalate To"
  </code></pre>
  
  <p>How to achieve this using Hibernate Criteria, and most Important, I have to use it for pagination.</p>
  
  <p><strong>and My Dao is as follows to show the list of Issues in jqgrid</strong></p>
  
  <blockquote>
    <p>public List showHelpDeskIssues(DetachedCriteria dc, int from,
    int size) {</p>
  
  <pre><code>Session session = HibernateUtil.getSessionFactory().getCurrentSession();
   try
    {
  
      Criteria criteria = dc.getExecutableCriteria(session);
      criteria.setFirstResult(from);
      criteria.setMaxResults(size);
      criteria.add(Restrictions.eq("status","Escalate To"));
  
      return criteria.list();
    }
    catch (HibernateException e)
    {
      e.printStackTrace();
      throw e;
    } }
  </code></pre>
  </blockquote>
  
  <p>For brief explanation please refer this question <a href="https://stackoverflow.com/questions/14211501/how-to-show-two-tables-data-in-jqgrid-using-struts2-jqgrid-plugin-and-hibernat">how to show two tables data in jqgrid using struts2 - jqgrid plugin and hibernate</a> 
  any help would be great.</p>