You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2010/10/28 20:18:31 UTC

svn commit: r1028409 - /db/torque/torque4/branches/trunk-without-village/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java

Author: tfischer
Date: Thu Oct 28 18:18:31 2010
New Revision: 1028409

URL: http://svn.apache.org/viewvc?rev=1028409&view=rev
Log:
fix doDelete(Criteria, Connection))

Modified:
    db/torque/torque4/branches/trunk-without-village/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java

Modified: db/torque/torque4/branches/trunk-without-village/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/branches/trunk-without-village/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java?rev=1028409&r1=1028408&r2=1028409&view=diff
==============================================================================
--- db/torque/torque4/branches/trunk-without-village/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java (original)
+++ db/torque/torque4/branches/trunk-without-village/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java Thu Oct 28 18:18:31 2010
@@ -265,7 +265,14 @@ public abstract class BasePeer
     public static void doDelete(Criteria criteria, Connection con)
         throws TorqueException
     {
-        doDelete(criteria, null, con);
+        Criteria.Criterion criterion
+                = (Criteria.Criterion) criteria.values().iterator().next();
+        String tableName = criterion.getTable();
+        if (StringUtils.isEmpty(tableName))
+        {
+            throw new TorqueException("Unqualified column name in criteria");
+        }
+        doDelete(criteria, tableName, con);
     }
 
     /**



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