I have a class Story that inherits from a base class called DomainObject that has common properties factored into it. When I explicitly set the table name to "Story" in the Story class using annotations, the schema export tool still creates a table named "domainobject". I'm using hibernate 3. Database is mysql5. Here is the relevant code. Anybody know what's up?
Code:
@Entity
public abstract class DomainObject<T> implements Serializable{
private T id;
private Date dateCreated = new Date();
private Date dateUpdated;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public T getId() {
return id;
}
@Entity
@Table(name="Story")
public class Story extends DomainObject<Long> {
private String headline;
private String subject;
private String body;
private String image;
private boolean publish;
private int displayOrder;
private int number;
@Column
public String getHeadline() {
return headline;
}