Hi,

I wanted to followup on what Fedor said...  I can't seem to find the
project-jdbc attribute.  I want to make sure before I start writing code,
that someone hasn't already done this.  I hope this is the appropriate place
to post this.

Basically I want to take a list of table names, and build the
project-schema.xml file from that.  The project schema would have all the
data filled out.  Then you could take the project-schema.xml file and feed
it into torque to build the OR classes.  

I don't believe anything exists to take a list of table names and create an
XML representation.  I know the Village package takes a tables DDL and
creates the OR off of that, but nothing exists to convert the DDL to an XML
representation as far as I know.  

I plan on using the JDOM library to create and output the XML file.

Any suggestions on direction would be much appreciated...

Eric

-----Original Message-----
From: Fedor Karpelevitch [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 20, 2001 10:27 AM
To: '[EMAIL PROTECTED]'
Subject: RE: How to create myapp-schema.xml for Torque?


there is project-jdbc target in torque buildfile which does what you want

fedor.

-------------------------------
Amicus Plato amicus Aristoteles magis amica veritas

> -----Original Message-----
> From: Pugh, Eric [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 20, 2001 6:54 AM
> To: '[EMAIL PROTECTED]'
> Subject: How to create myapp-schema.xml for Torque?
> 
> 
> Hi all,
> 
> I played with the code base town and village, and I think 
> Torque's OM is
> based on village.  My problem with village and town, and now 
> maybe with
> Torque is creating that XML file the first time!  We have a smallish
> database, but it still has ~80 tables, and I don't want to by 
> hand code this
> giant XML file.  Maintaining it would be a pain as well.  Is 
> there a tool
> that I can point at my Database and get the newapp-schema.xml 
> file out of?
> Or is there any tool that will create a standard XML 
> representation of the
> databases DDL that I could then try and convert to the format 
> that Torque
> requires using XSLT?
> 
> Thanks,
> Eric
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 19, 2001 3:42 PM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: jakarta-turbine-torque build.xml
> 
> 
> dlr         01/09/19 12:41:50
> 
>   Modified:    .        build.xml
>   Log:
>   Commons Collections is also a prerequisite of this build.
>   
>   Revision  Changes    Path
>   1.13      +19 -1     jakarta-turbine-torque/build.xml
>   
>   Index: build.xml
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-torque/build.xml,v
>   retrieving revision 1.12
>   retrieving revision 1.13
>   diff -u -u -r1.12 -r1.13
>   --- build.xml       2001/08/30 15:58:54     1.12
>   +++ build.xml       2001/09/19 19:41:50     1.13
>   @@ -15,6 +15,7 @@
>        <pathelement location="${village.jar}"/>
>        <pathelement location="${jdbc.jar}"/>
>        <pathelement location="${log4j.jar}"/>
>   +    <pathelement location="${commons-collections.jar}"/>
>        <pathelement location="${commons-util.jar}"/>
>        <pathelement location="${junit.jar}"/>
>      </path>
>   @@ -33,6 +34,7 @@
>        <echo message="log4j.jar = ${log4j.jar}"/>
>        <echo message="jdbc.jar = ${jdbc.jar}"/>
>        <echo message="junit.jar = ${junit.jar}"/>
>   +    <echo message="commons-collections.jar =
> ${commons-collections.jar}"/>
>        <echo message="commons-util.jar = ${commons-util.jar}"/>
>      </target>
>    
>   @@ -80,6 +82,12 @@
>        />
>    
>        <available
>   +      classname="org.apache.commons.collections.ExtendedProperties"
>   +      property="commons-collections.present"
>   +      classpathref="classpath"
>   +    />
>   +
>   +    <available
>          
> classname="org.apache.commons.util.exception.NestableException"
>          property="commons-util.present"
>          classpathref="classpath"
>   @@ -130,6 +138,14 @@
>        </antcall>
>      </target>
>    
>   +  <target name="check.commons-collections"
>   +          unless="commons-collections.present">
>   +    <antcall target="property-warning">
>   +      <param name="name" value="commons-collections.jar"/>
>   +      <param name="value" value="${commons-collections.jar}"/>
>   +    </antcall>
>   +  </target>
>   +
>      <target name="check.commons-util" unless="commons-util.present">
>        <antcall target="property-warning">
>          <param name="name" value="commons-util.jar"/>
>   @@ -167,7 +183,8 @@
>      <!-- 
> ==================================================================
> -->
>      
>      <target name="prepare" 
>   -
> depends="init,check.velocity,check.xerces,check.village,check.
> log4j,check.co
> mmons-util,check.jdbc,env">
>   +    
> depends="init,check.velocity,check.xerces,check.village,check.log4j,
>   +
> check.commons-collections,check.commons-util,check.jdbc,env">
>        
>        <mkdir dir="${build.dir}"/>
>        <mkdir dir="${build.dest}"/>
>   @@ -424,6 +441,7 @@
>        <copy file="${xerces.jar}" todir="${torque.dir}/lib"/>
>        <copy file="${village.jar}" todir="${torque.dir}/lib"/>
>        <copy file="${log4j.jar}" todir="${torque.dir}/lib"/>
>   +    <copy file="${commons-collectiosn.jar}" 
> todir="${torque.dir}/lib"/>
>        <copy file="${commons-util.jar}" todir="${torque.dir}/lib"/>
>        <copy file="${jdbc.jar}" todir="${torque.dir}/lib"/>
>    
>   
>   
>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to