db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1028409 - /db/torque/torque4/branches/trunk-without-village/torque-runtime/src/main/java/org/apache/torque/util/BasePeer.java
Date Thu, 28 Oct 2010 18:18:31 GMT
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


Mime
View raw message