You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-user@db.apache.org by Wilfred Springer <wi...@tomtom.com> on 2006/03/23 17:06:54 UTC

HsqlDbBuilder Bug (?)

Hi all,

I'm not entirely sure if you would call this a bug, but according to the
HSQLDB documentation
http://www.hsqldb.org/doc/guide/ch09.html#create_index-section ,
creating unique indexes is deprecated. If you *do* create unique
indexes, then you will out that HSQLDB does not support foreign keys to
tables with unique indexes spanning multiple columns. However, if you
use the alter table statement to add a unique constraint, then all works
out fine. 

This has been haunting me for a day, so I created a fix for it. (Find
the patch file in the attachment.) It would be great if this could go
into the main trunk.

Thanks,

Wilfred

Wilfred Springer | Software Architect | TomTom |
wilfred.springer@tomtom.com

Re: HsqlDbBuilder Bug (?)

Posted by Thomas Dudziak <to...@gmail.com>.
On 3/23/06, Wilfred Springer <wi...@tomtom.com> wrote:

>  I'm not entirely sure if you would call this a bug, but according to the HSQLDB documentation http://www.hsqldb.org/doc/guide/ch09.html#create_index-section , creating unique indexes is deprecated. If you *do* create unique indexes, then you will out that HSQLDB does not support foreign keys to tables with unique indexes spanning multiple columns. However, if you use the alter table statement to add a unique constraint, then all works out fine.
>
>  This has been haunting me for a day, so I created a fix for it. (Find the patch file in the attachment.) It would be great if this could go into the main trunk.
>

Thanks, seems you're right, the index will always be created for
unique constraints (http://www.hsqldb.org/doc/guide/ch02.html#N1030E),
so the extra index does not seem to make a difference (other than that
it is not fully supported apparently).

But could you please create an issue in DdlUtils' JIRA for this (link
is on the website).

cheers,
Tom