db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helge Weissig <hel...@grajagan.org>
Subject Re: using a second database
Date Tue, 18 Apr 2006 18:27:07 GMT
On Apr 17, 2006, at 12:36 PM, Thomas Vandahl wrote:

> Yes, you can still do that. The name in the schema and the name in  
> the Torque configuration have nothing to do with the real name of  
> the database. This is usually specified in the JDBC-URL only. The  
> other two names are just used to handle the matching of generated  
> objects and configurations appropriately.
>
> I for example do this as well: The name of my schema is "turbine"  
> and the name of my developer database is "testdb".

ok, so now I am confused! I played around with different settings and  
I thought I had it down: The db name in the schema.xml file is  
inserted into the create-db.sql script and into all generated  
BasePeer objects and the configuration name in the Torque.properties  
file needs to be the same as well. Hence, if we want folks to work in  
their own sandbox, we would have to have

<database name="sandbox1">...</database>
torque.database.default=sandbox1
torque.dsfactory.sandbox1.factory=org.apache.torque.dsfactory.PerUserPoo 
lDataSourceFactory
torque.dsfactory.sandbox1. ...

I can see how you can work around that by enforcing manual creation  
of the db though. Maybe the lesser of the two not-so-evils?

cheers,
h.

---------------------------------------------------------------------
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