-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: SchemaExport producing incorrect SQL for HSQLDB
PostPosted: Tue Sep 28, 2004 5:09 pm 
Newbie

Joined: Mon Oct 27, 2003 10:14 am
Posts: 6
Hibernate version:
2.1.6

Name and version of the database you are using:
HSQLDB 1.7.1

The generated SQL (show_sql=true):
create table hovel_member (member_id bigint generated by default as identity (start with 1), username varchar(255) not null, password varchar(255) not null, email varchar(255) not null, first_name varchar(255), last_name varchar(255), created timestamp not null, updated timestamp not null)


In SchemaExport on the following line:

if (export) statement.executeUpdate( createSQL[j] );

The following SQLException is being thrown:

java.sql.SQLException: Unexpected token: GENERATED in statement [create table hovel_member (member_id bigint generated by default as identity (start with 1), username varchar(255) not null, password varchar(255) not null, email varchar(255) not null, first_name varchar(255), last_name varchar(255), created timestamp not null, updated timestamp not null)]

I imagine there's some incompatibility with the HSQLDialect.getIdentityColumnString() method and the HSQLDB version I'm using. Could this be the case?

Thanks,
Jeff


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 28, 2004 6:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
My understanding is that HSQL has changed from identity to sequences at some point (maybe the otherway). I have not looked in detail but two Dialects for the various versions are required - if my memory is correct.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 10, 2004 5:28 pm 
Newbie

Joined: Wed Nov 10, 2004 3:39 pm
Posts: 1
Location: Rochester, NY
david wrote:
My understanding is that HSQL has changed from identity to sequences at some point (maybe the otherway). I have not looked in detail but two Dialects for the various versions are required - if my memory is correct.


The difference between HSQLDB 1.7.1.x and 1.7.2.x is a couple years. I mistakenly downloaded the older version and the Dialect was off. Using the most current HSQLDB and Hibernate seems to work for me now, at least for table creation.

_________________
#1 - "I'm bored."
#2 - "So am I."
#1 - "Let's vilify someone."


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.