From: subhradeep b. <sub...@ya...> - 2006-07-17 07:45:39
|
Hi, I am a newbie to hibernate. I am getting the following exception: DEBUG SchemaExport:301 - create table EVENTS (EVENTS_ID bigint generated by default as identity (start with 1), EVENTS_DATE timestamp, EVENTS_TITLE varchar(255) not null, primary key (EVENTS_ID)) ERROR SchemaExport:272 - Unsuccessful: create table EVENTS (EVENTS_ID bigint generated by default as identity (start with 1), EVENTS_DATE timestamp, EVENTS_TITLE varchar(255) not null, primary key (EVENTS_ID)) ERROR SchemaExport:273 - Unexpected token: GENERATED in statement [create table EVENTS (EVENTS_ID bigint generated by default as identity (start with 1), EVENTS_DATE timestamp, EVENTS_TITLE varchar(255) not null, primary key (EVENTS_ID))] Following is the snapshot of the corresponding mapping: <class name="org.domain.events.Event" table="EVENTS"> <id name="id" column="EVENTS_ID"> <generator class="native"></generator> </id> <property name="date" type="timestamp" column="EVENTS_DATE"/> <property name="title" not-null="true" column="EVENTS_TITLE"/> </class> But when I change the generator class from native to increment it runs fine. I am using HSQL DB as my database. Could anyone please point me the problem. Regards, Subhra --------------------------------- Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Beta. |