openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1533047 - in /openjpa/trunk: ./ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/strategy/
Date Thu, 17 Oct 2013 11:04:35 GMT
Author: struberg
Date: Thu Oct 17 11:04:35 2013
New Revision: 1533047

URL: http://svn.apache.org/r1533047
Log:
OPENJPA-2221 AbstractValueHandler map() fix applied to trunk

Added:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/strategy/
      - copied from r1384400, openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/strategy/
Modified:
    openjpa/trunk/   (props changed)
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java

Propchange: openjpa/trunk/
------------------------------------------------------------------------------
  Merged /openjpa/branches/2.2.x:r1384400

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=1533047&r1=1533046&r2=1533047&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Thu Oct 17 11:04:35 2013
@@ -1424,9 +1424,21 @@ public class DBDictionary
     /**
      * Set a completely unknown parameter into a prepared statement.
      */
-    public void setUnknown(PreparedStatement stmnt, int idx, Object val,
-        Column col)
-        throws SQLException {
+    public void setUnknown(PreparedStatement stmt, int idx, Object val, Column col) throws
SQLException {
+        if (val instanceof Object[]) {
+            Object[] valArray = (Object[])val;
+            for (Object object : valArray) {
+                setUnknown(stmt, idx, col, object);
+            }
+        } else {
+            setUnknown(stmt, idx, col, val);
+        }
+    }
+    
+    /**
+     * Set a completely unknown parameter into a prepared statement.
+     */
+    public void setUnknown(PreparedStatement stmnt, int idx, Column col, Object val) throws
SQLException {
         Sized sized = null;
         Calendard cald = null;
         if (val instanceof Sized) {



Mime
View raw message