You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by John Dunne <im...@alldunne.com> on 2006/03/31 10:41:05 UTC

multiple databases and addDescendingOrderByColumn

Is it possible to create a set of torque class files (from a schema.xml 
file) that will work for multiple copies of schematically (?) identical 
databases? The problem I have is a nullpointerexception whenever I call 
addDescendingOrderByColumn on the database other than the one specified 
in the name property of the database xml element in schema.xml.

For example

      Criteria crit = new Criteria(databasename);
      crit.addDescendingOrderByColumn(TablenamePeer.STARTTIME);
      List l = TablenamePeer.doSelect(crit);

will generate a null pointer exception if databasename!=default db name 
i.e. the database name specified in the schema.xml. I've tried replacing 
the name property with * and comma deliminating all databases names, no 
success.... Any assistance would be gratefully welcome.

John.

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


Re: multiple databases and addDescendingOrderByColumn

Posted by Thomas Fischer <tf...@apache.org>.
I would guess the problem is described in

http://issues.apache.org/scarab/issues/id/TRQS285

My problem was to patch village to not cache the table descriptions. It's 
not a good solution because of performance degradation.

     Thomas

On Fri, 31 Mar 2006, John Dunne wrote:

> Is it possible to create a set of torque class files (from a schema.xml file) 
> that will work for multiple copies of schematically (?) identical databases? 
> The problem I have is a nullpointerexception whenever I call 
> addDescendingOrderByColumn on the database other than the one specified in 
> the name property of the database xml element in schema.xml.
>
> For example
>
>     Criteria crit = new Criteria(databasename);
>     crit.addDescendingOrderByColumn(TablenamePeer.STARTTIME);
>     List l = TablenamePeer.doSelect(crit);
>
> will generate a null pointer exception if databasename!=default db name i.e. 
> the database name specified in the schema.xml. I've tried replacing the name 
> property with * and comma deliminating all databases names, no success.... 
> Any assistance would be gratefully welcome.
>
> John.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>

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