title: How do I query for only superclass entities in a jpql query?
body: <p>I have the following entities:</p>
  
  <pre><code>@Entity
  @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
  @DiscriminatorColumn(name="orderType", discriminatorType=DiscriminatorType.STRING)
  @DiscriminatorValue(value="BASE")
  @Table(name = "orders")
  public class OrderEntity implements Serializable {
  ...
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@Entity
  @DiscriminatorValue(value="RECURRING")
  public class RecurringOrderEntity extends OrderEntity{
  ...
  </code></pre>
  
  <p>I can find all the subclasses (RecurringOrderEntity) with the following jpql:</p>
  
  <pre><code>Query q = em.createQuery(
                  "SELECT o from RecurringOrderEntity o where "
                  + "o.cancellationDate is null "
                  + "and o.maxOccurrences = o.occurrence");
  </code></pre>
  
  <p>What is the JPQL syntax for finding <em>only</em> entities that are <em>not</em> instances of <em>RecurringOrderEntity</em>?  </p>
  
  <p>I am using Eclipselink 2.0.0 as the JPA provider.</p>
  
  <p>thanks!</p>