title: Does JPARepository use method return type to find target table?
body: <p>This seems to work, but I'd like someone to confirm this:</p>
  
  <p>I have a base class BaseEntity for my entities.</p>
  
  <pre><code>@Entity
  @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
  public abstract class BaseEntity {
  ...
  }
  </code></pre>
  
  <p>I then have several entities, say A and B and C that extend from BaseEntity.
  In addition, I have a single JPARepository defined as:</p>
  
  <pre><code>JPARepository&lt;BaseEntity, Long&gt;
  </code></pre>
  
  <p>Now it <strong>looks like</strong> I can use this repository to query tables A,B or C separately with simply changing the return type. For example:</p>
  
  <pre><code>public List&lt;B&gt; findBsByNameContaining(String name);
  </code></pre>
  
  <p>will result in a query that selects rows from table B only.</p>
  
  <p>Is this really how it works?</p>