title: JPA Discriminator Value
body: <p>I have a problem with JPA and Discriminator Value.
  value=0 should be mapped as a <code>user</code> and value=1 should be mapped as a <code>admin</code> but I only get the users</p>
  
  <pre><code>@Entity
  @Table(name="T_USERS")
  @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
  @DiscriminatorColumn(name="usergroup", discriminatorType = DiscriminatorType.INTEGER)
  public abstract class UserModel implements Serializable {
  
  @Id
  @GeneratedValue(strategy=GenerationType.IDENTITY)
  @Column(name="T_USERS_PK")
  private int id;
  @Column(name="username")
  private String username;
  @Column(name="password")
  private String password;
  @Column(name="firstname")
  private String firstname;
  @Column(name="lastname")
  private String lastname;
  @Column(name="usergroup")
  private String usergroup;
  </code></pre>
  
  <p>-</p>
  
  <pre><code>@Entity
  @DiscriminatorValue("0")
  public class User extends UserModel {
  </code></pre>
  
  <p>-</p>
  
  <pre><code>@Entity
  @DiscriminatorValue("1")
  public class Admin extends UserModel {
  </code></pre>