title: Recursive JPA query?
body: <p>Does JPA 2 have any mechanism for running recursive queries?</p>
  
  <p>Here's my situation: I have an entity E, which contains an integer field x. It also may have children of type E, mapped via @OneToMany. What I'd like to do is find an E by primary key, and get its value of x, along with the x values of all its descendants. Is there any way to do this in a single query?</p>
  
  <p>I'm using Hibernate 3.5.3, but I'd prefer not to have any explicit dependencies on Hibernate APIs.</p>
  
  <hr>
  
  <p>EDIT: According to <a href="https://stackoverflow.com/questions/2486757/hql-recursion-how-do-i-do-this">this</a> item, Hibernate does <em>not</em> have this feature, or at least it didn't in March. So it seems unlikely that JPA would have it, but I'd like to make sure.</p>