You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Dudgeon, Tim" <TD...@OSIP.com> on 2001/12/12 12:02:02 UTC

TorqueJDBCTransformTask problems

I'm trying to pick up an existing database schema using
TorqueJDBCTransformTask, but I and having problems.

Firstly there is no ant task to do this (I seem to remember there used to be
one somewhere), so I'm having to reverse engineer this and maybe haven't got
it quite right. I've added the following taskdef

<taskdef name="jdbc-xml"
      classname="org.apache.turbine.torque.TorqueJDBCTransformTask">
      <classpath refid="classpath"/>
</taskdef>

and the following target

 <target name="jdbc2xml" depends="init-tasks">
    <jdbc-xml
	  dbDriver="${databaseDriver}"
	  dbUrl="${databaseUrl}"
	  dbUser="${databaseUser}"
	  dbPassword="${databasePassword}"
      outputFile="schema/schema.xml"
    />
</target>

These seem to work and give me schema.xml output file.
However this file seems to have two problems. Firstly the column types are
missing e.g.

<table name="MD$DICTVER">
        <column name="MD_DICTIONARY_VERSION_C" size="30" type=""/>
        <column name="MD_DICTIONARY_VERSION_N" type=""/>
</table>

This happens when connecting to Oracle or MySQL.

And secondly, when connecting to Oracle (which has foreign keys, MySQL
doesn't so not relevent here), Foreign key constraits are not picked up and
added to schema.xml. 

Am I doing something wrong here, or is Torque?

I'm using the Torque-2.1 binary release.

Many thanks

Tim

--------------------------------------------
Dr. Tim Dudgeon
OSI Pharmaceuticals, Watlington Road, Oxford, OX4 6LT, UK
Tel: +44 (01865) 780800
email: tdudgeon@osip.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TorqueJDBCTransformTask problems

Posted by mp...@marmot.at.
please grab jakarta-turbine-torque from cvs and give it a try (the generated xml 
is compatible to 2.1 so you can use torque-3.0dev for the Transform job)

in 3.0dev you can define a schema for oracle ;-)

martin

Quoting "Dudgeon, Tim" <TD...@OSIP.com>:

> I'm trying to pick up an existing database schema using
> TorqueJDBCTransformTask, but I and having problems.
> 
> Firstly there is no ant task to do this (I seem to remember there used
> to be
> one somewhere), so I'm having to reverse engineer this and maybe haven't
> got
> it quite right. I've added the following taskdef
> 
> <taskdef name="jdbc-xml"
>       classname="org.apache.turbine.torque.TorqueJDBCTransformTask">
>       <classpath refid="classpath"/>
> </taskdef>
> 
> and the following target
> 
>  <target name="jdbc2xml" depends="init-tasks">
>     <jdbc-xml
> 	  dbDriver="${databaseDriver}"
> 	  dbUrl="${databaseUrl}"
> 	  dbUser="${databaseUser}"
> 	  dbPassword="${databasePassword}"
>       outputFile="schema/schema.xml"
>     />
> </target>
> 
> These seem to work and give me schema.xml output file.
> However this file seems to have two problems. Firstly the column types
> are
> missing e.g.
> 
> <table name="MD$DICTVER">
>         <column name="MD_DICTIONARY_VERSION_C" size="30" type=""/>
>         <column name="MD_DICTIONARY_VERSION_N" type=""/>
> </table>
> 
> This happens when connecting to Oracle or MySQL.
> 
> And secondly, when connecting to Oracle (which has foreign keys, MySQL
> doesn't so not relevent here), Foreign key constraits are not picked up
> and
> added to schema.xml. 
> 
> Am I doing something wrong here, or is Torque?
> 
> I'm using the Torque-2.1 binary release.
> 
> Many thanks
> 
> Tim
> 
> --------------------------------------------
> Dr. Tim Dudgeon
> OSI Pharmaceuticals, Watlington Road, Oxford, OX4 6LT, UK
> Tel: +44 (01865) 780800
> email: tdudgeon@osip.com
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>