Hi all,
I have the code
Code:
@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)
[b]@AttributeOverride(name="name", column=@Column(name="retr_clm_mthd_nam", length=255)) [/b]
public class Retrospective extends AbstractClaimType {
...
and when I create the database in memory to test
Code:
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
I look the scriptdb and there is
CREATE MEMORY TABLE RETR_CLM_MTHD(…., NAM VARCHAR(255), ….)
Why not retr_clm_mthd_nam? What is wrong?
Regards & thanks