title: JPA query for DTYPE
body: <p>I have a single table which is generated from two jpa entities (inheritance). So we have a DTYPE column generated in the database table which has entity name has values.</p>
  
  <p>How do I write a jpa query to fetch data for any given entity. i.e DTYPE = 'A'?</p>
  
  <p>I just tried using DTYPE in jpa query but as expected I got an error "Could not resolve property". Please let me know how to write this query.</p>
  
  <p>Note - I dont want to use native query.</p>
  
  <p>Update:</p>
  
  <p>I have class A and subclass AA which extends A. DTYPE has two values A and AA.</p>
  
  <p>When I query for A, I get all the A plus AA entities. How to exclude AA when I query for A?</p>