Hi,
I am using Torque 3.2 and I try to make the default database settable
during runtime.
I created a class DefaultDatabase with a static method getName() that
takes the default
database name from a property file.
Then I modified the MapBuilder.vm and Peer.vm to refer to this getName()
method instead of the template variable $table.Database.Name.
MapBuilder.vm:
< dbMap = Torque.getDatabaseMap(DefaultDatabase.getName());
---
> dbMap = Torque.getDatabaseMap("$table.Database.Name");
Peer.vm:
< public static final String DATABASE_NAME = DefaultDatabase.getName();
<
---
> public static final String DATABASE_NAME = "$table.Database.Name";
>
So is this the right way to make the default database settable. Or did I
miss something ? It seems
unlikely that I am the only one so far who wants to change the database
without regenerating
classes.
Thanks,
Mehmet Erdem
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]