title: Filter subclass entities of the supclass single table with JpaRepository
body: <p>I have a supclass named Vehicle which is abstract and extended by two subclasses Car and Motorbike.</p>
  
  <p>On the DAO layer I created just one interface repository for the Vehicle <strong>single table</strong> which includes all the vehicle types (cars and motorbikes), in this repository interface I need to create a methode findCars which returns just Car entities from the main table Vehicle, and another methode findMotorbikes which returns Motorbike entities, how can I manipulate that please.</p>
  
  <p>This is the code of the Vehicle class :</p>
  
  <pre><code>@Entity
  @Table(name = "Vehicle")
  @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
  @DiscriminatorColumn(name = "Type", discriminatorType = DiscriminatorType.STRING, length = 10)
  public abstract class Vehicle {
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
      private String model;
  }
  </code></pre>
  
  <p>Car class :</p>
  
  <pre><code>@Entity
  @DiscriminatorValue("Car")
  public class Car extends Vehicle {
      private String x;
  }
  </code></pre>
  
  <p>Motorbike class :</p>
  
  <pre><code>@Entity
  @DiscriminatorValue("Motorbike")
  public class Motorbike extends Vehicle {
      private String y;
  }
  </code></pre>