db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CP Lim <cp_...@redsheriff.com>
Subject Re: Attn: PostgreSQL users
Date Sun, 09 Feb 2003 22:35:26 GMT
Hi Scott,

The DATABASE_NAME is initialised to "default" for all Base*Peer classes. 
  Is this correct?  (I hope so)

Had a look at my generated Base*Peer class code, and in particular 
looked at the generated 'public static ObjectKey doInsert(Criteria, 
Connection)' method, and the first thing it does is checks the following:

------------------------------------------
if (criteria.getDbName() == Torque.getDefaultDB())
{
     criteria.setDbName(DATABASE_NAME);
}
------------------------------------------

I'm going to change the configuration (Torque.properties) a few times 
and see if it affects the processing of the (subsequent call to ) 
BasePeer.doInsert() method.  However, I'm not terribly familiar with the 
structure and purpose of the Torque code, so am not sure if I'm looking 
in the correct places to try and analyse the crux of the problem.

Anyway, thanks for the input so far.  Will post back to list when I get 
something more concrete.

cheers,
CP


Scott Eade wrote:
> I am wondering if it is a generation time vs. a runtime thing.  What is
> DATABASE_NAME initialised to in the generated Base*Peer classes?
> 
> The runtime Torque.properties can be configured to handle multiple
> databases.  You configure a dsfactory for each database and map a physical
> database to the logical database name that is used internally by torque.
> The torque.database.default property is used to configure which dsfactory
> should be used when one is not provided to a query (although I suspect
> torque is really using the DATABASE_NAME property generated into the
> Base*Peer class).
> 
> HTH,
> 
> Scott


-- 
R E D S H E R I F F
C.P. Lim - Software Engineer
Level 1, 10 Queens Road    +61 3 9864 0733 tel
Melbourne VIC              +61 3 9864 0778 fax
Australia                  +61 413 781 846 mob

This message and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you are not the intended recipient, you are hereby 
notified that any use or dissemination of this communication is strictly 
prohibited. If you have received this message in error please notify us 
immediately by return email or telephone +61 (3) 9659 0432, then delete 
this message. Any views expressed in this message are those of the 
individual sender and many not necessarily reflect the views of Red 
Sheriff.


Mime
View raw message