db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Fitch <domin...@midsouth.rr.com>
Subject Bug with SQL generation for Derby
Date Thu, 13 Apr 2006 18:06:27 GMT
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