Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » hsqldb
hsqldb [message #386565] Tue, 31 March 2009 14:21 Go to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
I love writing unit tests against an in-memory database, so I usually pull out HSQLDB for that. But I get the impression that the support for HSQLDB in Eclipselink is very minimal. The GeneratedValue is converted to a identify column, but the generated DDL code is incorrect (syntax error) when letting EclipseLink generate the database.

Time for me to get the 1.1 source distribution and work on the HSQLDB implementation?
Re: hsqldb [message #386567 is a reply to message #386565] Tue, 31 March 2009 14:26 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
Hmmm, HSQLDB only supports IDENTITY on integers (Eclipselink mirror that from a Java Integer class) or bigints (no idea what Java class Eclipselink will mirror to that). So sequences would be very welcome.
Re: hsqldb [message #386570 is a reply to message #386565] Wed, 01 April 2009 13:21 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

What DDL and error do you get?

For database independent sequencing you can use TABLE sequencing. It is
also more efficient than IDENTITY sequencing.

You might also consider Derby/JavaDB as a test database.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Re: hsqldb [message #386578 is a reply to message #386570] Thu, 02 April 2009 09:15 Go to previous message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
> What DDL and error do you get?

HSQLDB only allows IDENTITY on columns of type Integer or BigInt. EclipseLink generates a column of type Decimal-something. I can get you the exact error tomorrow.


> For database independent sequencing you can use TABLE sequencing. It is
> also more efficient than IDENTITY sequencing.

Is that so? Hm. It sure it more portable, but I intended to enable sequences in the HSQLDB database platform. Table or sequence? Hm, table is more portable and that is the goal here, so I think I'll be using table.


> You might also consider Derby/JavaDB as a test database.

Those do not work in memory; this is unittesting, so I need a new clean database everytime. In memory is very practical.

Tom
Previous Topic:Eclipselink 1.1: java.lang.ClassCast,Exception: org.eclipse.persistence.internal.helper.IdentityWeak
Next Topic:[MOXy] Plugin to build mapping against a schema like DALI for JPA
Goto Forum:
  


Current Time: Thu Apr 18 01:48:33 GMT 2024

Powered by FUDForum. Page generated in 0.02137 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top