1

I have defined a Article entity with hibernate annotations:

@Entity
@Table(name = "WZQ_ARTICLES")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "ARTICLE_TYPE", discriminatorType = DiscriminatorType.STRING)
@DiscriminatorValue("CURRENT")
public class Article {
    }

It uses a ARTICLE_TYPE column as the discriminator column. But the generated hbm doesn't contain it.

When I insert a new Article entity, it will report an exception said:

Caused by: org.h2.jdbc.JdbcSQLException: Column "ARTICLE_TYPE" not found; SQL statement:
Freewind
  • 193,756
  • 157
  • 432
  • 708

0 Answers0