You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Justin Lawler <ju...@eircom.net> on 2002/03/01 00:44:34 UTC

torque tasks?

Hi all,

I was wondering if there was any better documentation for torque and torque ant tasks other than on the torque site?
Specifically, i was wondering what the ant task "torque-datasql" is and how is it different to "torque-sql"? Also what is "torque-datadtd"?
Also, I think I read in the documentation that you can create databases and tables directly from the xml schema files in some other ant task? how would you go about doing this?

thanks in advance,

Justin

Re: torque tasks?

Posted by Martin Poeschl <mp...@marmot.at>.
Justin Lawler wrote:
> Hi all,
> 
> I was wondering if there was any better documentation for torque and torque ant tasks other than on the torque site?
> Specifically, i was wondering what the ant task "torque-datasql" is and how is it different to "torque-sql"? Also what is "torque-datadtd"?
> Also, I think I read in the documentation that you can create databases and tables directly from the xml schema files in some other ant task? how would you go about doing this?

there is no better doc at the moment (doc contributions are always welcome ;-)

the datasql task generated sql to insert data while the sqltask creates sql to create the tables.
the datadtd task creates a dtd file for the data.xml file

look at the runtime tests.
it includes tests for all task so you should be able to understand what they do.

martin

> 
> thanks in advance,
> 
> Justin
> 
> 




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


Re: Extend User Question

Posted by Scott Eade <se...@backstagetech.com.au>.
Jim,

I strongly recommend applying the changes in the extend-user-howto to the
sample newapp application that comes with the tdk before going on to
implementing this for your own application.  This is pretty much a cut and
paste exercise, but all of the necessary steps are included and you will end
up with a clear understanding of how the various parts fit together.

See also my comments below.

HTH,

Scott

> From: Jim Knoll <jk...@indy.rr.com>
> Reply-To: "Turbine Users List" <tu...@jakarta.apache.org>
> Date: Thu, 28 Feb 2002 20:17:53 -0500
> To: Turbine Users List <tu...@jakarta.apache.org>
> Subject: Extend User Question
> 
> Hello,
> 
>   I am trying to follow the Extend User How To.  I receive compilation
>   errors when the compile target executes.  One of the errors indicates
>   TurbineUserPeer is an unknown symbol in BaseStatusReportUserPeer.java.
>   If I edit that file to include import
>   org.apache.turbine.om.security.peer.*;, the error is fixed.  My errors
>   seem to result from the inability to find class definitions.
> 
>   After I fix the compilation errors, the generated code
>   overwrites my changes.  I think I am not configuring the properties
>   properly.
>   
>   Here is my schema:
>   
> <database>
>   <table name="STATUS_REPORT_USER" javaName="StatusReportUser"
>       alias="TurbineUser"
>       baseClass="org.dyndns.jimknoll.status_report.om.TurbineUserAdapter"
>       
> basePeerClass="org.dyndns.jimknoll.status_report.om.TurbineUserPeerAdapter">
>       <column name="USER_ID" primaryKey="true" required="true"
> type="integer"/>
>   </table>
> 
>   <table name="StatusEntries">
STATUS_ENTRIES?
>       <column name="StatusId" required="true" autoIncrement="true"
STATUS_ID?
>           primaryKey="true" type="INTEGER"/>
>       <column name="USER_ID" required="true" type="INTEGER"/>
>       <foreign-key foreignTable="STATUS_REPORT_USER">
>           <reference local="USER_ID" foreign="USER_ID"/>
>       </foreign-key>
>       <column name="Comment" size="255" type="VARCHAR"/>
COMMENT?
>       <column name="Date" size="14" type="TIMESTAMP"/>
DATE? (is this a reserved word?)
>       <column name="Progress" size="10" type="VARCHAR"/>
PROGRESS?
>   </table>

I think you need to define your columns before your foreign keys.
Validating you schema is a great way to pick up errors.

> </database>
>   
>   I would appreciate any help.
> 
>   Jim
> 
> --
> 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>


Re: Extend User Question

Posted by Christian Asmussen <kr...@kriconet.com.br>.
Hei this is not the first question about extending turbine user I see on
this list.  Maybe someone should refactor the howto?  I would do it
myself, but I don't really understand it :-(

On Thu, 28 Feb 2002, Jim Knoll wrote:

> Hello,
> 
>     I am trying to follow the Extend User How To.  I receive compilation
>     errors when the compile target executes.  One of the errors indicates
>     TurbineUserPeer is an unknown symbol in BaseStatusReportUserPeer.java.
>     If I edit that file to include import
>     org.apache.turbine.om.security.peer.*;, the error is fixed.  My errors
>     seem to result from the inability to find class definitions.
> 
>     After I fix the compilation errors, the generated code
>     overwrites my changes.  I think I am not configuring the properties
>     properly.
>     
>     Here is my schema:
>     
> <database>
>     <table name="STATUS_REPORT_USER" javaName="StatusReportUser"
>         alias="TurbineUser"
>         baseClass="org.dyndns.jimknoll.status_report.om.TurbineUserAdapter"
>         basePeerClass="org.dyndns.jimknoll.status_report.om.TurbineUserPeerAdapter">
>         <column name="USER_ID" primaryKey="true" required="true" type="integer"/>
>     </table>
> 
>     <table name="StatusEntries">
>         <column name="StatusId" required="true" autoIncrement="true" 
>             primaryKey="true" type="INTEGER"/>
>         <column name="USER_ID" required="true" type="INTEGER"/>
>         <foreign-key foreignTable="STATUS_REPORT_USER">
>             <reference local="USER_ID" foreign="USER_ID"/>
>         </foreign-key>
>         <column name="Comment" size="255" type="VARCHAR"/>
>         <column name="Date" size="14" type="TIMESTAMP"/>
>         <column name="Progress" size="10" type="VARCHAR"/>
>     </table>
> </database>
>     
>     I would appreciate any help.
> 
>     Jim
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 

-- 
As you grouw older, you'll find the only
things you regred are the things you didn't do.

 - Zachary Scott


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


Extend User Question

Posted by Jim Knoll <jk...@indy.rr.com>.
Hello,

    I am trying to follow the Extend User How To.  I receive compilation
    errors when the compile target executes.  One of the errors indicates
    TurbineUserPeer is an unknown symbol in BaseStatusReportUserPeer.java.
    If I edit that file to include import
    org.apache.turbine.om.security.peer.*;, the error is fixed.  My errors
    seem to result from the inability to find class definitions.

    After I fix the compilation errors, the generated code
    overwrites my changes.  I think I am not configuring the properties
    properly.
    
    Here is my schema:
    
<database>
    <table name="STATUS_REPORT_USER" javaName="StatusReportUser"
        alias="TurbineUser"
        baseClass="org.dyndns.jimknoll.status_report.om.TurbineUserAdapter"
        basePeerClass="org.dyndns.jimknoll.status_report.om.TurbineUserPeerAdapter">
        <column name="USER_ID" primaryKey="true" required="true" type="integer"/>
    </table>

    <table name="StatusEntries">
        <column name="StatusId" required="true" autoIncrement="true" 
            primaryKey="true" type="INTEGER"/>
        <column name="USER_ID" required="true" type="INTEGER"/>
        <foreign-key foreignTable="STATUS_REPORT_USER">
            <reference local="USER_ID" foreign="USER_ID"/>
        </foreign-key>
        <column name="Comment" size="255" type="VARCHAR"/>
        <column name="Date" size="14" type="TIMESTAMP"/>
        <column name="Progress" size="10" type="VARCHAR"/>
    </table>
</database>
    
    I would appreciate any help.

    Jim

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