hibernate ant工具生成的hbm文件将丢失;鉴别器列“;
我已经定义了一个带有hibernate注释的hibernate ant工具生成的hbm文件将丢失;鉴别器列“;,hibernate,annotations,hibernate-tools,Hibernate,Annotations,Hibernate Tools,我已经定义了一个带有hibernate注释的文章实体: @Entity @Table(name = "WZQ_ARTICLES") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "ARTICLE_TYPE", discriminatorType = DiscriminatorType.STRING) @DiscriminatorValue("CURRENT") public cl
文章
实体:
@Entity
@Table(name = "WZQ_ARTICLES")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "ARTICLE_TYPE", discriminatorType = DiscriminatorType.STRING)
@DiscriminatorValue("CURRENT")
public class Article {
}
它使用文章类型
列作为鉴别器列。但是生成的hbm不包含它
当我插入一个新的文章
实体时,它将报告一个异常,如:
Caused by: org.h2.jdbc.JdbcSQLException: Column "ARTICLE_TYPE" not found; SQL statement: