[Hibernate] Unexpected token: GENERATED in statement

2006-07-17 Thread subhradeep bhatacharya
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"/  /classBut 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.
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Unexpected token: GENERATED in statement

2006-07-17 Thread Max Rydahl Andersen

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 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.



-- 
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel