Hi,
I encounter problems with id columns in DDL generated with hbm2ddl tool for JPA entities having ids generated with AUTO strategy.
I have the following entity :
Code:
@Entity
public class Person {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private Long id;
}
If i set hibernate.id.new_generator_mappings property to true (which is recommended in the user documentation for new projects), the DDL generated for SQL Server looks wrong since the "id" columns is not an IDENTITY one. Instead it generates a "hibernate_sequence" table. Same kind of problem with MySQL.
If I set hibernate.id.new_generator_mappings property to false the id column is an IDENTITY one so the DDL is OK.
Maybe I misunderstood something ?
Thanks for your help !
Olivier