db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raphael.x.man...@gsk.com
Subject Re: AW: inefficient doDelete
Date Mon, 14 Mar 2005 15:46:29 GMT
With all due respect, this vitiates much of the point of using Torque. A
major reason for my using Torque is that I thereby do *not* have to hand
craft SQL: it is a tedious and error prone process.

Hand-crafted SQL means that code maitnenance is much more difficult. If I
change the schema, with pure Torque my code will probably fail to compile.
If I have written SQL by hand the code will still compile and I will not
discover any errors  until run-time.




|---------+--------------------------------->
|         |           "Vitzethum, Daniel"   |
|         |           <Daniel.Vitzethum@giga|
|         |           tronik.com>           |
|         |                                 |
|         |                                 |
|         |           14-Mar-2005 14:50     |
|         |           Please respond to     |
|         |           "Apache Torque Users  |
|         |           List"                 |
|         |           <torque-user@db.apache|
|         |           .org>                 |
|         |                                 |
|---------+--------------------------------->
  >-------------------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                                  |
  |                                                                                      
                                  |
  |                                                                                      
                                  |
  |       To:      "Apache Torque Users List" <torque-user@db.apache.org>          
                                        |
  |                                                                                      
                                  |
  |       cc:                                                                            
                                  |
  |       Subject: AW: inefficient doDelete                                              
                                  |
  >-------------------------------------------------------------------------------------------------------------------------|



Hello Paul,

> How are people handling this?

as already mentioned by someone else (Thomas?), I suppose you
could/should
delegate it to the database with a custom sql, e.g.

  BasePeer.executeStatement("DELETE FROM " + FooPeer.TABLE_NAME + "
WHERE " + FooPeer.A_COLUMN + "=1");

That wouldn't load all records and use the performance of the DB for
large amounts of data.


HTH,

Daniel

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