db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <tfisc...@apache.org>
Subject Re: Bug with SQL generation for Derby
Date Fri, 14 Apr 2006 08:41:49 GMT
This is fixed in svn, but not in 3.2. 3.2 was the first Torque version 
with alpha support for derby, so it is not bug-free. You may want to build 
from svn for derby.

     Thomas

On Thu, 13 Apr 2006, Christopher Fitch wrote:

> One of our other developers ran across this problem using Torque 3.2:
>
> The xml schema that starts:
> <?xml version="1.0"?>
> <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_2.dtd">
> <!-- Autogenerated by JDBCToXMLSchema! -->
> <database name="somedb">
>            <table name="URI">
>                        <column name="URI_ID" primaryKey="true" 
> required="true" type="NUMERIC" size="10"/>
>                        <column name="URI_STRING" required="true" size="800" 
> type="VARCHAR"/>
>                        <index name="XUID">
>                                    <index-column name="URI_ID"/>
>                        </index>
>                        <index name="XUSTRING">
>                                    <index-column name="URI_STRING"/>
>                        </index>
>            </table>
> </database>
>
> Generates the invalid derby sql:
> -----------------------------------------------------------------------------
> -- URI
> -----------------------------------------------------------------------------
> drop table URI;
>
> CREATE TABLE URI
> (
>    URI_ID NUMERIC(10) NOT NULL,
>    URI_STRING VARCHAR(800) NOT NULL,
>    PRIMARY KEY(URI_ID),
> );
>
> CREATE  INDEX XUID ON URI (URI_ID);
> CREATE  INDEX XUSTRING ON URI (URI_STRING);
>
>
> *NOTE* there is a trailing comma that isn’t being trimmed at the end of the 
> PRIMARY KEY line.
>
>
> I noticed in Scarab that there was an entry for this issue with regards to 
> foreign keys but it seems that it is still there.
>
> Any thoughts?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>

Mime
View raw message