Hi,
I'm not what we can call an expert with hibernate, so before reporting this problem as I bug, I want to confirm with other the problem I have with it.
I'm using hibernate with annotation connecting to HSQLDB. I notice hibernate failed to create some tables due to wrong construction of SQL. Here the error logs :
Code:
21-Feb-2010 9:00:05 AM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
SEVERE: Unsuccessful: create table Inscription (id bigint generated by default as identity (start with 1), order integer not null, position integer, competitionDiscipline_id bigint not null, mount_id bigint not null, rider_id bigint not null, primary key (id))
21-Feb-2010 9:00:05 AM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
SEVERE: Unexpected token: ORDER in statement [create table Inscription (id bigint generated by default as identity (start with 1), order]
The error message make a lot of sense since there is the 'ORDER' keywork used as a field name, but it is possible to create a column of name 'ORDER' by using double quote.
Code:
create table Inscription (id bigint generated by default as identity (start with 1), "order" integer not null, position integer, competitionDiscipline_id bigint not null, mount_id bigint not null, rider_id bigint not null, primary key (id))
Thanks
Patrik Dufresne