db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r591648 - in /db/torque: runtime/trunk/src/java/org/apache/torque/util/BasePeer.java runtime/trunk/src/java/org/apache/torque/util/Criteria.java site/trunk/xdocs/changes.xml
Date Sat, 03 Nov 2007 16:34:01 GMT
Author: tfischer
Date: Sat Nov  3 09:34:00 2007
New Revision: 591648

URL: http://svn.apache.org/viewvc?rev=591648&view=rev
Log:
treat integer criterions as Integer, not as String in PreparedStatement-Selects

Modified:
    db/torque/runtime/trunk/src/java/org/apache/torque/util/BasePeer.java
    db/torque/runtime/trunk/src/java/org/apache/torque/util/Criteria.java
    db/torque/site/trunk/xdocs/changes.xml

Modified: db/torque/runtime/trunk/src/java/org/apache/torque/util/BasePeer.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/util/BasePeer.java?rev=591648&r1=591647&r2=591648&view=diff
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/util/BasePeer.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/util/BasePeer.java Sat Nov  3 09:34:00
2007
@@ -1427,6 +1427,10 @@
                     statement.setBigDecimal(i + 1,
                         ((NumberKey) param).getBigDecimal());
                 }
+                else if (param instanceof Integer)
+                {
+                    statement.setInt(i + 1, ((Integer) param).intValue());
+                }
                 else
                 {
                     statement.setString(i + 1, param.toString());

Modified: db/torque/runtime/trunk/src/java/org/apache/torque/util/Criteria.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/util/Criteria.java?rev=591648&r1=591647&r2=591648&view=diff
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/util/Criteria.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/util/Criteria.java Sat Nov  3 09:34:00
2007
@@ -3541,6 +3541,10 @@
                         params.add(new java.sql.Date(
                                            ((DateKey) value).getDate().getTime()));
                     }
+                    else if (value instanceof Integer)
+                    {
+                        params.add(value);
+                    }
                     else
                     {
                         params.add(value.toString());

Modified: db/torque/site/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/xdocs/changes.xml?rev=591648&r1=591647&r2=591648&view=diff
==============================================================================
--- db/torque/site/trunk/xdocs/changes.xml (original)
+++ db/torque/site/trunk/xdocs/changes.xml Sat Nov  3 09:34:00 2007
@@ -31,6 +31,10 @@
 
   <body>
   <release version="3.3-RC3" date="in SVN">
+    <action type="change" dev="tfischer">
+      Criterions with an integer value will now be set using
+      PreparedStatemet#setInt() when doing a PsSelect.
+    </action>
     <action type="change" dev="tv">
       Integrated Village into Torque. Thanks to Henning, Jean, Jon and Scott for
       the paperwork.



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