cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1510035 - /cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java
Date Sat, 03 Aug 2013 16:35:56 GMT
Author: aadamchik
Date: Sat Aug  3 16:35:55 2013
New Revision: 1510035

URL: http://svn.apache.org/r1510035
Log:
CAY-1856  Expression.expWithParameters does not work when parameters are placed in the inline
collection

Modified:
    cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java

Modified: cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java?rev=1510035&r1=1510034&r2=1510035&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java
(original)
+++ cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java
Sat Aug  3 16:35:55 2013
@@ -312,6 +312,21 @@ public abstract class Expression impleme
 
             public Object transform(Object object) {
                 if (!(object instanceof ExpressionParameter)) {
+
+                    // mainly for the ASTList array child...
+                    if (object instanceof Object[]) {
+
+                        Object[] source = (Object[]) object;
+                        int len = source.length;
+                        Object[] target = new Object[len];
+
+                        for (int i = 0; i < len; i++) {
+                            target[i] = transform(source[i]);
+                        }
+                        
+                        return target;
+                    }
+
                     return object;
                 }
 



Mime
View raw message