hi, in hibernate,
how can i do join inheritance mapping??/
Code:
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "TYPE", discriminatorType = DiscriminatorType.STRING)
@org.hibernate.annotations.ForceDiscriminator
@Table(name = "Components")
public class Component implements Serializable {
@Id
@GeneratedValue(generator = "sequence")
@GenericGenerator(name = "sequence", strategy = "sequence",
parameters = {
@Parameter(name = "sequence", value = "Components_SEQUENCE")
})
protected Long id;
getter/setter
}
===============
@Entity
@Table(name = "Documents")
@DiscriminatorValue("Document")
public class Document extends Component {
@Column
private String content;
getter/setter
}
and i use the "auto-create" to let hibernate automatically create table,
after table were created, i didn`t see there is a column call TYPE for DiscriminatorValue
how can i do joined inheritance mapping ???