you can use the <database name="poolA" attribute to set the default pool
to "poolA".  If the database name is not given it defaults to
"default".  You can give an alternate pool for a Criteria with the 
criteria.setDbName("poolB") method.  Many of the BasePeer methods as
well as the object save methods can take a dbName argument as well.

john mcnally

Jacopo Cappellato wrote:
> 
> Hi.
> 
> This is a newbie question... I think.
> I don't understand what is the connection between peers and a specific db
> (pool).
> Example:
> I have two different db (the Turbine db adapters are installed) and I have
> configured in TR.properties two different db pools, poolA and poolB.
> The two dbs contain the same table ITEM.
> I want to create, through Torque, only the peer classes (not the SQL
> scripts) for the ITEM table; so I edit the MyProject-schema.xml in which I
> describe (for Torque) the table structure, and I run the proper ant task
> Can I use the same generated ITEM peers to select records from the two
> different pools?
> What is the the pool used as default and how is it selected?
> The peer classes are completely independent from the underlying db?
> 
> Thanks in advance,
> Jacopo
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to