I previously had this entity
Code:
@Entity
@Table(name = "SOMETABLE")
@AccessType("field")
public class SomeEntity implements java.io.Serializable {
Then I changed it to this
Code:
@Entity
@Table(name = "SOMETABLE")
@AccessType("field")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "DISCRIMINATOR", discriminatorType = DiscriminatorType.STRING, length = 20)
@DiscriminatorValue(value = "Some")
public class SomeEntity implements java.io.Serializable {
and I added some subclasses
Code:
@Entity
@DiscriminatorValue(value = "SomeOther")
public class SomeOtherEntity extends SomeEntity {
Hibernate does not add a new Discriminator column to SOMETABLE for rows that were previously there.
It is adding other new columns I have defined in SomeEntity. @ForceDiscriminator didn't seem to do anything. How do I get the column to show up in a clean way?