db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Schutt <ryan_sch...@yahoo.com>
Subject Using Torque with one database schema, multiple physical databases
Date Thu, 22 May 2003 02:04:00 GMT
Here's our setup:

- one database schema (call it "db-schema.xml")
- six physical databases (call them db1 thru db6)
- six application servers, each residing over one db
- one Torque.properties, replicated at each app server

Each app server needs to be able to connect to all 6 db's, so in our
Torque.properties, we have a section set up for each db.  

It is our understanding that to connect to a different db, all you have to do
is a criteria.setDbName(dbName), and everything should work from there. 
However, we have had problems in using this approach with queries that use
ORDER BY's.  

The root of the problem appears to be that Torque uses information from the
map/*MapBuilder.java classes when doing queries that use ORDER BY's.  But
Torque only generates this information for the one db in db-schema.xml.  So
when we try to query a different database, it isn't finding the necessary info
in the map/*MapBuilder.java classes.


Is there something wrong with our approach?  I know that Torque supports
multiple databases;  it is annoying that our approach is failing.

Anyone have similar problems?


Thanks,
Ryan

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Mime
View raw message