You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Gregorio, Nelson" <Ne...@sonda.com> on 2001/03/22 21:31:40 UTC
Torque+default database name
In torque's mapbuilder class, into doBuild metdod generate dbName is coded,
so if i change db name I´ve compile all class om/peer again (because i need
give a new database name in schema.xml ), my guess is that the name database
must to be read it from TR.properties, e.i. database.default.name=myDBname,
so I just need change this porperties and dont compile again.
In the MapBuilder.vm
/** the doBuild() method builds the DatabaseMap */
public void doBuild ( ) throws Exception
{
dbMap = TurbineDB.getDatabaseMap("$table.Database.Name");
change for
/** the doBuild() method builds the DatabaseMap */
public void doBuild ( ) throws Exception
{
dbMap =
TurbineDB.getDatabaseMap(TurbineResources.getString("database.default.name",
"default"));
Maybe other change are necesary : Criteria, TurbineDB
Nelson Gregorio.
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Torque+default database name
Posted by John McNally <jm...@collab.net>.
I do not understand the problem here. Give the database a name in your
schema and refer to it when setting properties in TR.props.
If you've named your database <database name="nondefault"> in the schema
use that in TR.props
database.nondefault.driver=org.gjt.mm.mysql.Driver
etc.
What does the property
database.default.name=nondefault
mean?
John McNally
"Gregorio, Nelson" wrote:
>
> In torque's mapbuilder class, into doBuild metdod generate dbName is coded,
> so if i change db name I´ve compile all class om/peer again (because i need
> give a new database name in schema.xml ), my guess is that the name database
> must to be read it from TR.properties, e.i. database.default.name=myDBname,
> so I just need change this porperties and dont compile again.
>
> In the MapBuilder.vm
>
> /** the doBuild() method builds the DatabaseMap */
> public void doBuild ( ) throws Exception
> {
> dbMap = TurbineDB.getDatabaseMap("$table.Database.Name");
>
> change for
>
> /** the doBuild() method builds the DatabaseMap */
> public void doBuild ( ) throws Exception
> {
> dbMap =
> TurbineDB.getDatabaseMap(TurbineResources.getString("database.default.name",
> "default"));
>
> Maybe other change are necesary : Criteria, TurbineDB
>
> Nelson Gregorio.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org