title: JPA (and inheritance) how do I get all entities of a given superclass
body: <p>Given the following entity definitions:</p>
  
  <pre><code>@Entity
  class abstract A {
      Collection&lt;A&gt; parents;
  }
  
  
  @Entity
  class B extends A {
  
  }
  
  
  @Entity
  class C extends A {
  
  }
  </code></pre>
  
  <p>is it possible to define a method which returns all entities of type B &amp; C having a given parent, <strong>without</strong> having to make two separate calls and then merging the results?</p>
  
  <pre><code>Collection&lt;A&gt; getAllByParentId(long id)
  </code></pre>