db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1098715 - /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doDelete.vm
Date Mon, 02 May 2011 18:23:20 GMT
Author: tfischer
Date: Mon May  2 18:23:19 2011
New Revision: 1098715

URL: http://svn.apache.org/viewvc?rev=1098715&view=rev
Log:
use primary key for deleting

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doDelete.vm

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doDelete.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doDelete.vm?rev=1098715&r1=1098714&r2=1098715&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doDelete.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doDelete.vm
Mon May  2 18:23:19 2011
@@ -82,7 +82,9 @@
      */
     public static void doDelete($dbObjectClassName obj) throws TorqueException
     {
-        ${peerClassName}.doDelete(${peerClassName}.buildSelectCriteria(obj));
+        ## TODO use buildSelectCriteria if no pk is present
+        ${peerClassName}.doDelete(
+            ${peerClassName}.buildCriteria(obj.getPrimaryKey()));
     }
 
     /**
@@ -98,7 +100,9 @@
     public static void doDelete($dbObjectClassName obj, Connection con)
         throws TorqueException
     {
-        ${peerClassName}.doDelete(${peerClassName}.buildSelectCriteria(obj), con);
+        ## TODO use buildSelectCriteria if no pk is present
+        ${peerClassName}.doDelete(
+            ${peerClassName}.buildCriteria(obj.getPrimaryKey()), con);
     }
 
     /**



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