db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Thexton <da...@consultants.co.nz>
Subject Re: Patch included to fix problems with TorqueDataDumpTask
Date Thu, 29 Jan 2004 23:23:36 GMT
Hi,

> I've been trying to use Torque to write database independent schema and 
> data files and allow the loading of these to MySQL for development and 
> (soon) Oracle for production.
> 
> To capture sample data entered from our application I will occassionally 
> use the TorqueDataDumpTask to save data from MySQL as a Torque data file.
> 
> I've discovered (and fixed) a number of problems:
> 
> 1.  The first row of each table was missed.
> 2.  The last row of each table with at least 1 row contained just
>     null values.
> 
> I fixed these by changing the way calls TableTool wrapped a ResultSet as 
> an Iterator.
> 
> 3.  The MySQL type LONGTEXT defaulted to a VARCHAR.
> 
> I added a mapping from Types.Other to SchemaType.CLOB.  I hope this is 
> right.  Maybe someone else knows better, but it works for me.
> 
> 4.  The DOCTYPE definition in the "torque-data.xml" misreferences the
>     DTD.
> 
> Initially I changed the reference to "file:src/schema/torque-data.dtd", 
> but I found that as this was relative to the current working directory 
> when I invoked a subproject Maven goal from my top level Maven project 
> it was looking relative to the top level project.
> 
> I resolved to remove the reference.  Again, maybe someone else knows 
> better, but this now works for me.
> 
> I've included a unified diff of my work, partly just in the hope that 
> these changes will be incorporated into the next release of Torque and 
> thus prevent me from needing custom modifications, but also in the hope 
> that it might help someone else.

Oops.  I've actually attached my unified diff this time.

Thanks.



Mime
View raw message