title: Query by type in Spring Data JPA
body: <p>I've abstract class:</p>
  
  <pre><code>@Entity
  @Inheritance(strategy = InheritanceType.JOINED)
  public abstract class A {
    ...
  }
  </code></pre>
  
  <p>and few extending classes, like:</p>
  
  <pre><code>@Entity
  public class B extends A {
    ...
  }
  </code></pre>
  
  <p>I also have third entity:</p>
  
  <pre><code>@Entity
  public class C  {
  
    @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    private A objectA;
    ...
  }
  </code></pre>
  
  <p>And the question is, how can I construct Spring Data JPA finder in C entity repository to query only objects extending A with desired type?</p>