title: JPA fetch collection of subclass
body: <p>I have a case where we have an inheritance strategy like this (this is an example of the jpa wiki, our real example is an other business case :))</p>
  
  <pre><code>@Entity
  @Inheritance
  @DiscriminatorColumn(name="PROJ_TYPE")
  @Table(name="PROJECT")
  public abstract class Project {
    @Id
    private long id;
    ...
  }
  @Entity
  @DiscriminatorValue("L")
  public class LargeProject extends Project {
    @OneToMany
    private Set&lt;Member&gt; members;
  }
  @Entity
  @DiscriminatorValue("S")
  public class SmallProject extends Project {
  }
  </code></pre>
  
  <p>I have a bunch of projects in my database and want to fetch all the projects at once, but by doing this, i also want to fetch my list of members at once.
  Is there a way to do this with jpql? I know the TYPE annotation allows me to look at the type, but can I combine this with a JOIN FETCH?</p>
  
  <p>I'm using hibernate, but don't want to downgrade back to the hibernate api if I don't need to</p>