私はコードを持っています
@MappedSuperclass
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@XmlAccessorType(XmlAccessType.FIELD)
public abstract class AbstractModel implements Serializable, Comparable<AbstractModel> {
private static final long serialVersionUID = -4479726024447228668L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "idgen")
private Long id;
...
@MappedSuperclass
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@XmlAccessorType(XmlAccessType.FIELD)
public abstract class AbstractHistoricModel extends AbstractModel {
private static final long serialVersionUID = -3596885940998632065L;
@Column(name = "pblc_id")
...
@Entity
@SequenceGenerator(initialValue = 0, name = "idgen", sequenceName = "abstract_claim_type_seq")
@XmlAccessorType(XmlAccessType.FIELD)
public class AbstractClaimType extends AbstractHistoricModel {
private static final long serialVersionUID = -3840541568639732203L;
@Column(name = "nam")
private String name;
public AbstractClaimType() { super(); }
@Field
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
...
@Entity
@Table("retr_clm_mthd")
@SequenceGenerator….
@FieldModel
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@AttributeOverride(name="nam", column=@Column(name="retr_clm_mthd_nam", length=255))
public class Retrospective extends AbstractClaimType {
...
そして、テストするためにメモリ内にデータベースを作成するとき
2013-04-11 14:15:28,445 ERROR (org.hibernate.tool.hbm2ddl.SchemaExport:org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:386)) - HHH000231: Schema export unsuccessful
org.hibernate.tool.hbm2ddl.ImportScriptException: Error during statement execution (file: '/import.sql')
Caused by: java.sql.SQLException: Column not found: RETR_CLM_MTHD_NAM in statement
私はscriptdbを見て、そこにあります
CREATE MEMORY TABLE RETR_CLM_MTHD(….,NAM VARCHAR(255),….)
なぜretr_clm_mthd_nam
ですか?なにが問題ですか?