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".

I'm not quite sure why this happens. The expression above clearly compares instances, not string values. So the expression should only evaluate to true if you set criteria.setDbName(Torque.getDefaultDB()); Any other string "B" should evaluate to false, because it is not the same string object. Can you confirm this?

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

Bye, Thomas.


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

Reply via email to