db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject Re: Criteria.setDbName() and BaseXXXPeer.setDbName()
Date Fri, 13 Apr 2007 10:33:52 GMT
Thomas Vandahl <thomas.vandahl@tewisoft.de> schrieb am 13.04.2007 12:02:48:

> Thomas Fischer wrote:
>
> > private static void setDbName(Criteria crit)
> > {
> >     if (crit.getDbName() == Torque.getDefaultDB())
> >     {
> >         crit.setDbName(DATABASE_NAME);
> >     }
> > }
> >
> > So because B (by chance) is the default database, BaseXXXPeer decides
to
> > replace "B" by its own database, "A", although I have told the criteria
> > explicitly to use the database "B".
>
Sorry, the example code I used in testing was not the one I used in the
email. I used Criteria.setDbName(Torque.getDefaultDb()) and thought I
should clarify this by writing "B" instead, but this leads to different
results :-(. Thanks for noting.
But this does not change the point that I explicitly stated in the code
that the Default DB should be used and it does not get used.

> (Generally I agree that this behaviour is highly mystic and should be
> changed.)

Do you think it should be changed in RC3 ?

  Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message