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 Zé Carlos <ze...@gmail.com> on 2008/11/14 13:35:17 UTC

More than one database

Hi there, i'm new to Torque and i'm making some tests to see if Torque fits
my needs.
Untll now, i'm finding torque amazingly simple and perfect for what i need,
i tried hibernate and i dint like it.

I have 2 doubts.

The first doubt:
Can i use more than one database at the same time ? I would need to work
with a remote database and with a local database with almost the same
schema. Do i need to generate te same schema 2 times ant put it in 2
different packages ? or can i reuse generated classes to 2 different
connections ?

The second doubt:
Is it possible to map many-to-many associations with Torque? I know it's not
hard to implement that association by hand customizing some classes. But if
already exists some generator solution, it would be great! because i have a
lot of them.

By the way, an IRC channel would be a good improvement to the project
support.

Regards!

RE: More than one database

Posted by Thomas Fischer <fi...@seitenbau.net>.
> Hi there, i'm new to Torque and i'm making some tests to see if Torque 
fits
> my needs.
> Untll now, i'm finding torque amazingly simple and perfect for what i 
need,
> i tried hibernate and i dint like it.
> 
> I have 2 doubts.
> 
> The first doubt:
> Can i use more than one database at the same time ? I would need to work
> with a remote database and with a local database with almost the same
> schema. Do i need to generate te same schema 2 times ant put it in 2
> different packages ? or can i reuse generated classes to 2 different
> connections ?

If each class lives in only one database, this is easy. If some classes 
live in two databases, this is more complex but feasible (I have done it).

> 
> The second doubt:
> Is it possible to map many-to-many associations with Torque? I know it's 
not
> hard to implement that association by hand customizing some classes. But 
if
> already exists some generator solution, it would be great! because i 
have a
> lot of them.

You need to model two 1:n relations in Torque. There is no automated 
solution.

> By the way, an IRC channel would be a good improvement to the project
> support.

There is not enough man power.

    Thomas