db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Dunne <j...@alldunne.com>
Subject Re: multiple databases and doDelete
Date Fri, 19 Aug 2005 10:08:06 GMT
I'm of the thinking that this is a bug? I've been able to workaround the 
problem by getting a java.sql.Connection directly to the database and 
issuing delete statements via  the connection's java.sql.Statement 
object (for those who come across this problem in future).

John.  


John Dunne wrote:

> Hello all,
>
> Any help on this problem would be gratefully appreciated.
>
> Im getting a null pointer exception when I call doDelete (see code)
>
>      Criteria crit = new Criteria(databasename);
>      crit.add(InvoicesPeer.INVOICEID);
>      InvoicesPeer.doDelete( crit);
>
> I've got two databases in MySQL (version 3) both with identical 
> schemas. The default database is set to 'db1' and the exception is 
> only thrown when databasename is set to 'db2'. The COM objects were 
> compiled from a schema that identified the database name as 'db1' (so 
> BaseInvoicesPeer has DATABASE_NAME='db1'; ), so i;m wondering if this 
> is the problem, but then whats the point in specifing the database 
> name to Critera!
>
> Further, I believe that Torque is configured proberly since I can 
> query (doSelect) and retrieve the contents of both db1 and db2. This 
> problem only occurs when I call doDelete!
>
> 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


Mime
View raw message