You are incorrect, though you bring up a good point.  The DatabaseMap name
is intended to match the name given to a database in
TurbineResources.properties.  This means there would be two identical
DatabaseMaps for two identical databases.

Can you sort it out so that the build method in your MapBuilders accept a
database name?  This seems the cleanest solution to me, but I have not
looked at the code as much as you, recently.



----- Original Message -----
From: Tomasz Skutnik <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Monday, August 28, 2000 3:30 PM
Subject: Re: Problem with Peer class...


> Wait a minute... According to what I have seen in the Turbine code this
> constructor sets only database NAME, which is used to identifiy
> parameters to connect to database (See BasePeer.java & DBBroker.java),
> and getDatabaseMap() parameter is used to identify >>DatabaseMap
> object<< -> this means that, from out point of view, dbMap has NOTHING
> to do with name of database (in TurbineResources.properties), so you can
> have exactly the same database map (logical structure) for two different
> database (e.g. two mirrors on different servers).
>
> Still digging...:-)
>
> Scooter.
>
> John McNally wrote:
> >
> > Earlier you said:
> >
> > > Hi.
> > >
> > > I need help with following problem. I have set up database (other than
> > > default), and I try to use my ObjectPeer class to retrieve objects
from
> > > it. I do this that way:
> > >
> > > Criteria = new Criteria("mydatabase");
> > > criteria.add(ObjectPeer.objectId,objId);
> > > Vector v = ObjectPeer.doSelect(criteria);
> > >
> >
> > Now you are saying you are using the default database:
> >
> > > Nope. Torque generated
> > > DBBroker.getInstance().getDatabaseMap(DBBroker.DEFAULT), which is
> > > virtually the same.
> >
> > If you are placing the TableMap for "Object" into the "default"
DatabaseMap,
> > it will not be found in the "mydatabase" DatabaseMap.
> >
> > John McNally
> >
> > ------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> > Problems?:           [EMAIL PROTECTED]
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
>



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to