From: Max R. A. <max...@jb...> - 2006-07-17 07:49:34
|
use user forum at forum.hibernate.org for user questions - this is for = hibernate core development. /max > 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 identit= y = > (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=3D"org.domain.events.Event" table=3D"EVENTS"> > <id name=3D"id" column=3D"EVENTS_ID"> > <generator class=3D"native"></generator> > </id> > <property name=3D"date" type=3D"timestamp" column=3D"EVENTS_DATE"/> > <property name=3D"title" not-null=3D"true" column=3D"EVENTS_TITLE"/>= > </class> > But when I change the generator class from native to increment it run= s = > 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. -- = -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate ma...@hi... http://hibernate.org JBoss Inc max...@jb... |