Hi.
I'm trying to generate a database schema for my project using hbm2ddl. I'm using JPA 2 annotations to specify how the schema should look like. Right now I'm having some issues with inherited id's.
I have an abstract super class, let's call it AbstractSuperClass, which looks like this:
@Entity
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
public abstract class AbstractSuperClass {
...
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
public Long getId() {
}
...
}
I've set the id to be an auto generated value which translates to SQL's auto_increment constraint. However when I look at the generated script, I don't see the id columns of the subclass tables to have the auto_increment in them.
Anyone has an idea how I could get that? Of course I could manually specify it but as much as possible I want it automated.
Thanks.