title: Hibernate DiscriminatorColumn.Type not working
body: <p>I have an abstract class AbstractTile</p>
  
  <pre><code>@Entity
  @Table(name = "TILES")
  @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
  @DiscriminatorColumn(name = "t_type", discriminatorType = DiscriminatorType.STRING)
  @DiscriminatorValue(value = "abstractTile")
  public class AbstractTile {
  
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(unique = true, nullable = false)
  private int id;
  //and so on
  }
  </code></pre>
  
  <p>and many classes which inherited from AbstractTile</p>
  
  <pre><code>@Entity
  @DiscriminatorValue(value = "dirt")
  public class DirtTile extends AbstractTile{
  //some code
  }
  
  @Entity
  @DiscriminatorValue(value = "grass")
  public class GrassTile extends AbstractTile{
  //some code
  }
  
  @Entity
  @DiscriminatorValue(value = "water")
  public class WaterTile extends AbstractTile{
  //some code
  }
  </code></pre>
  
  <p>problem is when I want to save them into database, it has error</p>
  
  <pre><code>Hibernate: 
  insert 
  into
      TILES
      (/*some data*/, t_type) 
  values
      (/*some data*/, 'dirt') 
  
  org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
  ERROR: Wrong value for type int : dirt
  </code></pre>
  
  <p>What am I doing wrong?
  The DiscriminatorType is set to String so why it wants int?</p>
  
  <p>EDIT: SQL create statement</p>
  
  <pre><code>CREATE TABLE tiles
  (
    t_type character varying(31) NOT NULL,
    id serial NOT NULL,
    isaccesible boolean,
    x integer NOT NULL,
    y integer NOT NULL,
    map_id integer NOT NULL,
    building_id integer,
    CONSTRAINT tiles_pkey PRIMARY KEY (id),
    CONSTRAINT fk4c20b65b1a758e7 FOREIGN KEY (building_id)
        REFERENCES physical_building (building_id) MATCH SIMPLE
        ON UPDATE NO ACTION ON DELETE NO ACTION,
    CONSTRAINT fk4c20b65bd903ec4 FOREIGN KEY (map_id)
        REFERENCES map (map_id) MATCH SIMPLE
        ON UPDATE NO ACTION ON DELETE NO ACTION
  )
  WITH (
    OIDS=FALSE
  );
  ALTER TABLE tiles
    OWNER TO postgres;
  </code></pre>