Discussion:
[Middlegen-user] Middlegen and Hsqldb - compound keys
Darren Hartford
2004-05-18 12:14:22 UTC
Permalink
Hey all,
Has anyone had success using Middlegen with Hsql/Hypersonic where the database contains compound primary keys? It seems Hsql creates compound PK's only through Unique and not through a 'Primary Key' constraint, and as such Middlegen doesn't recognize the compound primary key.

Does anyone have some info/feedback on this? I'm a little stuck as I was hoping to do code-gen from a Hypersonic DB schema.

-D
Darren Hartford
2004-05-19 13:36:05 UTC
Permalink
In case anyone else may be interested, I have not found a work-around, and instead have switched to McKoi database :-)
-D
-----Original Message-----
From: Darren Hartford
Sent: Tuesday, May 18, 2004 10:12 AM
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Middlegen and Hsqldb - compound keys


Hey all,
Has anyone had success using Middlegen with Hsql/Hypersonic where the database contains compound primary keys? It seems Hsql creates compound PK's only through Unique and not through a 'Primary Key' constraint, and as such Middlegen doesn't recognize the compound primary key.

Does anyone have some info/feedback on this? I'm a little stuck as I was hoping to do code-gen from a Hypersonic DB schema.

-D


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=ick
Eivind Waaler
2004-05-21 06:02:06 UTC
Permalink
Doesn't the standard Middlegen sample (persons, reservations, flights) use
compound primary key for the reservations table? It does something like
this in the create script:

PRIMARY KEY ("reservation_id","person_id_fk","flight_id_fk")

Seems to work fine. Middlegen reads it as a compound primary key.

.eivind
Post by Darren Hartford
In case anyone else may be interested, I have not found a work-around, and instead have switched to McKoi database :-)
-D
-----Original Message-----
From: Darren Hartford
Sent: Tuesday, May 18, 2004 10:12 AM
Subject: [Middlegen-user] Middlegen and Hsqldb - compound keys
Hey all,
Has anyone had success using Middlegen with Hsql/Hypersonic where the database contains compound primary keys? It seems Hsql creates compound PK's only through Unique and not through a 'Primary Key' constraint, and as such Middlegen doesn't recognize the compound primary key.
Does anyone have some info/feedback on this? I'm a little stuck as I was hoping to do code-gen from a Hypersonic DB schema.
-D
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
Loading...