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


This e-mail (and any attachments) may contain privileged and/or confidential 
information. If you are not the intended recipient please do not disclose, copy, 
distribute, disseminate or take any action in reliance on it. If you have received 
this message in error please reply and tell us and then delete it. Should you wish to 
communicate with us by e-mail we cannot guarantee the security of any data outside our 
own computer systems. For the protection of Legal & General's systems and staff, 
incoming emails will be automatically scanned.
 
Any information contained in this message may be subject to applicable terms and 
conditions and must not be construed as giving investment advice within or outside the 
United Kingdom.
 
Representative only of the Legal & General marketing group, members of which are 
regulated by the Financial Services Authority for the purposes of advising on life 
assurance and investment products bearing Legal & General's name. 
Legal & General Group PLC, Temple Court, 11 Queen Victoria Street, London, EC4N 4TP. 
Registered in England no: 166055.



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