You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Vikas Phonsa <VP...@suz.com> on 2003/11/17 22:22:51 UTC

How to start projects with Torque

Hi,

I went thru the torque tutorials and made a database.

Now I would like to know how to start or manage such database project with
Torque.

In the schema folder under the torque installation dir I had my database
schema for the first database. How do I create a second database.

Is every different database or database project supposed to be started with
its separate torque directory structure.

I mean I want to create multiple databases and generate java classes for
them. So how would that be managed.

And I'm using Torque 3.0

Thanks in advance for your suggestions.

Vikas


-----Original Message-----
From: Vikas Phonsa [mailto:VPhonsa@suz.com] 
Sent: Monday, November 17, 2003 11:53 AM
To: 'Apache Torque Users List'
Subject: import statements in generated java classes

Hi,

I wasn't able to compile the java classes that were generated from the
database schema by torque.

I had to manually add import statements for java.util.List,
java.util.Iterator and org.apache.torque.util.Criteria to compile them.

Is this the way it normally should work ?

Why were those imports, if reqd were generated in the java files ?


Any ideas ?

Thanks

Vikas



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: How to start projects with Torque

Posted by Derick Fernando <de...@tarausa.com>.
Hello,

In the schema folder you can have databaseone-schema.xml,
databasetwo-schema.xml etc.
In your properties file you can have:

torque.database.databaseone
torque.database.databasetwo

type settings.

Derick

----- Original Message ----- 
From: "Vikas Phonsa" <VP...@suz.com>
To: "'Apache Torque Users List'" <to...@db.apache.org>
Sent: Monday, November 17, 2003 1:22 PM
Subject: How to start projects with Torque


> Hi,
>
> I went thru the torque tutorials and made a database.
>
> Now I would like to know how to start or manage such database project with
> Torque.
>
> In the schema folder under the torque installation dir I had my database
> schema for the first database. How do I create a second database.
>
> Is every different database or database project supposed to be started
with
> its separate torque directory structure.
>
> I mean I want to create multiple databases and generate java classes for
> them. So how would that be managed.
>
> And I'm using Torque 3.0
>
> Thanks in advance for your suggestions.
>
> Vikas
>
>
> -----Original Message-----
> From: Vikas Phonsa [mailto:VPhonsa@suz.com]
> Sent: Monday, November 17, 2003 11:53 AM
> To: 'Apache Torque Users List'
> Subject: import statements in generated java classes
>
> Hi,
>
> I wasn't able to compile the java classes that were generated from the
> database schema by torque.
>
> I had to manually add import statements for java.util.List,
> java.util.Iterator and org.apache.torque.util.Criteria to compile them.
>
> Is this the way it normally should work ?
>
> Why were those imports, if reqd were generated in the java files ?
>
>
> Any ideas ?
>
> Thanks
>
> Vikas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: How to start projects with Torque

Posted by CP Lim <cp...@redsheriff.com>.
Hi Vikas,

In your XML file, make sure you've got the root <database> element.  If 
you need a separate Database you'll just include a name there, eg. 
<database name="xyz"> and you'll use 'xyz' as the configuration in your 
Torque.properties file.  That means if you want separate databases, then 
use different XML files with different names.  However, if you want 
separate XML files and they all access the same database, then make sure 
they all have the same name in the <database> element.

HTH,
CP

Vikas Phonsa wrote:
> Hi,
> 
> I went thru the torque tutorials and made a database.
> 
> Now I would like to know how to start or manage such database project with
> Torque.
> 
> In the schema folder under the torque installation dir I had my database
> schema for the first database. How do I create a second database.
> 
> Is every different database or database project supposed to be started with
> its separate torque directory structure.
> 
> I mean I want to create multiple databases and generate java classes for
> them. So how would that be managed.
> 
> And I'm using Torque 3.0
> 
> Thanks in advance for your suggestions.
> 
> Vikas
> 
> 
> -----Original Message-----
> From: Vikas Phonsa [mailto:VPhonsa@suz.com] 
> Sent: Monday, November 17, 2003 11:53 AM
> To: 'Apache Torque Users List'
> Subject: import statements in generated java classes
> 
> Hi,
> 
> I wasn't able to compile the java classes that were generated from the
> database schema by torque.
> 
> I had to manually add import statements for java.util.List,
> java.util.Iterator and org.apache.torque.util.Criteria to compile them.
> 
> Is this the way it normally should work ?
> 
> Why were those imports, if reqd were generated in the java files ?
> 
> 
> Any ideas ?
> 
> Thanks
> 
> Vikas
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 
> 

-- 
R E D S H E R I F F
C.P. Lim - Software Engineer
[cp_lim@redsheriff.com]

96-98 Market St    +61 (3) 9606 4036 tel
South Melbourne    +61 (3) 9606 4001 fax
Victoria  3205     +61 (413) 781 846 cell

This message and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you are not the intended recipient, you are hereby 
notified that any use or dissemination of this communication is strictly 
prohibited. If you have received this message in error please notify us 
immediately by return email or telephone +61 (2) 8204 5888, then delete 
this message. Any views expressed in this message are those of the 
individual sender and many not necessarily reflect the views of Red 
Sheriff.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org