db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Haberman <step...@beachead.com>
Subject Re: Logical vs. physical db names - expanding the role of torque.database.name
Date Wed, 05 Feb 2003 15:26:30 GMT
On Wed, Feb 05, 2003 at 03:04:07PM +1100, Scott Eade wrote:
> What do others think?

Makes sense to me.

So, if I understand it correctly, current the logical name is pulled
from the *-schema.xml file, and dropped in the sqldb.map file that
maps schema to (currently logical).

You're saying this doesn't make sense because in fact we want SQL
generation tasks to use the physical database name, which does not
come from the *-schema.xml file, but is in the
'torque.database.name' property.

And the general solution would be to modify the SQL generation tasks
to not use the sqldb.map file to get the (wrong) database name, but
instead do something like add a 'databaseName' attribute that you
can set in the build-torque.xml to '${torque.database.name}'.

The only problem I foresee is people not having the
torque.database.name property currently set. As I look at my current
setup, torque.database.name is only set in the runtime

You'd have to find an elegant way of either finding a good default
for torque.database.name if it is not set (e.g. default to the
logical name from *-schema.xml) or else do something like prompt the
user that they need to set it (I'd go for the first one).

- Stephen

View raw message