Use the hsqldb version supplied with hibernate.

This email is just to notify you of a problem I had running the example, and
the workaround I applied to fix it.

I just downloaded Hibernate 2.1.1, and tried a quick check to confirm
everything was working. I copied hsqldb.jar into the lib dir (version
1.7.1), updated hibernate.properties as appropriate, and tried typing "ant
eg". Problems occurred trying to do the create table step:

 [java] 10:21:49,625 DEBUG SchemaExport:149 - create table AuctionItem (
 [java]    id BIGINT NOT NULL IDENTITY,
 [java]    description VARCHAR(255),
 [java]    ends TIMESTAMP,
 [java]    condition INTEGER,
 [java]    seller BIGINT not null,
 [java]    successfulBid BIGINT
 [java] )
 [java] 10:21:49,656 ERROR SchemaExport:154 - Unsuccessful: create table
AuctionItem...
 [java] 10:21:49,656 ERROR SchemaExport:155 - Wrong data type: ID in
statement [create table AuctionItem...

Reading through the hsqldb docs, I came across the following statement in
hsqlSyntax.html under the "CREATE TABLE" section:

  "Identity columns are autoincrement columns. They must be
  integer columns and are automatically primary key columns"

My reading is that BIGINT is not allowed as the type in an identity column
for hsqldb. However, the example java files use Long as the id type, which
Hibernate then maps to the BIGINT type.

I was able to get the example working by modifying the java files in a
number of places to change all occurences of Long to Integer. After this
change, the example worked perfectly. If anyone is interested in these
changes, I can send them on.

Cheers,
Joe



------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to