title: JPA : Inheritance - Discriminator value not taken into account in generated SQL
body: <p>I try to use this mapping :</p>
  
  <pre><code>@Entity
  @Table(name="ecc.\"RATE\"")
  @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
  @DiscriminatorColumn(name="DISCRIMINATOR", discriminatorType= DiscriminatorType.STRING)
  public abstract class Rate extends GenericBusinessObject {
  ...
  }
  
  @Entity
  @DiscriminatorValue("E")
  public class EntranceRate extends Rate { 
   @ManyToOne
   @JoinColumn(name = "\"RATES_GRID_ID\"")
   protected RatesGrid ratesGrid;
  ...
  }
  
  
  @Entity
  @Table(name="ecc.\"RATES_GRID\"")
  public class RatesGrid extends GenericBusinessObject {
   /** */
   @OneToMany(mappedBy = "ratesGrid",  targetEntity = EntranceRate.class, fetch=FetchType.LAZY)
   private List&lt;EntranceRate&gt; entranceRates;
  }
  </code></pre>
  
  <p>When I try to access my <code>entranceRates</code> list from a <code>ratesGrid</code> object, I get this error :</p>
  
  <pre><code>Object with id: 151 was not of the specified subclass: com.ecc.bo.rate.EntranceRate (loaded object was of wrong class class com.ecc.bo.rate.AnnualRate)
  </code></pre>
  
  <p>Looking at the sql generated, I found no trace of "discriminator=" in the where clause.
  What am I doing wrong ?</p>
  
  <p>I use a PostGreSQL database and a Hibernate as JPA provider.</p>