db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mkblueyonder" <mikend...@blueyonder.co.uk>
Subject RE: is torque going to evolve ?
Date Wed, 31 Mar 2004 16:15:11 GMT
Hi Alexandru,
In the Peer and Object methods you can specify a database name
that is different to the schema database name. Provided the
specified database name has the same schema (e.g. db2) you
should have no problems.
	e.g. Criteria.setDbName("dbx");
	e.g. <YourObject>.save("dbx") etc.
The parameter db will override the default one.
Best Regards,
Malcolm Kendall, NetVisionIT

-----Original Message-----
From: Alexandru Dovlecel [mailto:alexandru.dovlecel@siemens.com]
Sent: 31 March 2004 11:20
To: 'Apache Torque Users List'
Subject: RE: is torque going to evolve ?


I have a comment/question on this issue: 2 databases to be used by Torque.

I have DB1 and DB2, both with the same schema, generated by Torque. In the
runtime config file (torque.properties) I have them both mapped, one with
db1 and another database with db2 entries. Both of the databases are mssql.

The schema file has the <database> element containing a 'name' attribute. If
I set the attribute to 'db1', then the generated classes will work properly
with the DB1, but will not work with DB2. Am I right???

( In my case, I have wrote a wrong value for the name attribute and torque
has not working. )

AS a result of this, you have to generate two classes, one for DB1 and one
for DB2, even though they have exactly the same structure (only one
attribute is different, the DATABASe_NAME, I think). Is there any other way?
(sorry, I am just a novice).

And generalising this situation, I get the following problem: my app wants
to connect to several databases (same DBMS), they are configured at runtime.
(let's say xml file or some conf file, maybe even torque.properties). I
can't use torque for this app. Am I right???

Pls comment on this because I am not shure of what I am talking about.:)))
Yet it seems to be quite a nasty problem, if I am right. :(((

Sorry for this lenghty message.
Best regards,
Alex



> >I have a requirement to be able to access two or more DBs
> simultaneously. For
> >whatever reason, our DB designer has put some of the tables
> I need to use in one
> >Oracle DB and some in another. So, ease of configuration and
> coding  in that
> >area would be useful.
> >
> I think you will find this is supported now and is quite
> straightforward.
>
> Scott
>
> --
> Scott Eade
> Backstage Technologies Pty. Ltd.
> http://www.backstagetech.com.au
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message