title: How to use Oracle's 'connect by' clause in a JPA criteria query?
body: <p>I want to show parent child relation in a query using jpa criteria.
  But stuck with how to set <b>connect by</b> expression</p>
  
  <pre><code>ReadAllQuery raQuery = JpaHelper.getReadAllQuery(transquery);
  raQuery.setHierarchicalQueryClause(startswith, connectBy, order by);
  </code></pre>
  
  <p>where <b>transquery</b> is made from criteriaQuery with multiple selection and multiple joins</p>
  
  <p><b>I want to show parent and their child transactions as follow,but using in criteria query</b></p>
  
  <pre>
      select t0.state,t4.name,t7.money from transaction t0 
      LEFT OUTER JOIN transactionAgents t4 ON (t4.TRANSID = t0.ID)
      LEFT OUTER JOIN AgentReference t7 on  t7.id=t4.agentid
      where t0.transdate>'10-july-2014' and t0.circle=10
      connect by prior t0.id=t0.parent ORDER BY t0.LAST_MODIFIED ASC, t0.ID DESC
  </pre>