cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r560576 - in /cayenne/main/branches/STABLE-2.0/cayenne: cayenne-java/src/cayenne/java/org/apache/cayenne/access/trans/ cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ cayenne-other/release-notes/
Date Sat, 28 Jul 2007 17:25:28 GMT
Author: aadamchik
Date: Sat Jul 28 10:25:26 2007
New Revision: 560576

URL: http://svn.apache.org/viewvc?view=rev&rev=560576
Log:
CAY-832 enum-mapped columns improperly handled in in expressions - 2.0 BRANCH

Modified:
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/access/trans/QueryAssemblerHelper.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTAdd.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTAnd.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTBetween.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTDivide.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTEqual.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTGreater.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTGreaterOrEqual.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTIn.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLess.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLessOrEqual.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLike.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLikeIgnoreCase.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTMultiply.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNegate.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNot.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotBetween.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotEqual.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotIn.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotLike.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotLikeIgnoreCase.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTOr.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTSubtract.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/SimpleNode.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/access/trans/QueryAssemblerHelper.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/access/trans/QueryAssemblerHelper.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/access/trans/QueryAssemblerHelper.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/access/trans/QueryAssemblerHelper.java
Sat Jul 28 10:25:26 2007
@@ -27,6 +27,7 @@
 import org.apache.cayenne.DataObject;
 import org.apache.cayenne.ObjectId;
 import org.apache.cayenne.exp.Expression;
+import org.apache.cayenne.exp.parser.SimpleNode;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DbJoin;
@@ -285,8 +286,18 @@
      */
     protected DbAttribute paramsDbType(Expression e) {
         int len = e.getOperandCount();
-        // ignore unary expressions
+        
+        // for unary expressions, find parent binary - this is a hack mainly to support
+        // ASTList
         if (len < 2) {
+
+            if (e instanceof SimpleNode) {
+                Expression parent = (Expression) ((SimpleNode) e).jjtGetParent();
+                if (parent != null) {
+                    return paramsDbType(parent);
+                }
+            }
+
             return null;
         }
 

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTAdd.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTAdd.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTAdd.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTAdd.java
Sat Jul 28 10:25:26 2007
@@ -46,6 +46,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(nodes[i]), i);
         }
+        
+        connectChildren();
     }
 
     public ASTAdd(Collection nodes) {
@@ -55,6 +57,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(it.next()), i);
         }
+        
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTAnd.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTAnd.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTAnd.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTAnd.java
Sat Jul 28 10:25:26 2007
@@ -49,6 +49,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild((Node) nodes[i], i);
         }
+        
+        connectChildren();
     }
 
     public ASTAnd(Collection nodes) {
@@ -58,6 +60,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild((Node) it.next(), i);
         }
+        
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTBetween.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTBetween.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTBetween.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTBetween.java
Sat Jul 28 10:25:26 2007
@@ -43,6 +43,8 @@
         jjtAddChild(path, 0);
         jjtAddChild(new ASTScalar(value1), 1);
         jjtAddChild(new ASTScalar(value2), 2);
+        
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTDivide.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTDivide.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTDivide.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTDivide.java
Sat Jul 28 10:25:26 2007
@@ -47,6 +47,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(nodes[i]), i);
         }
+        
+        connectChildren();
     }
 
     public ASTDivide(Collection nodes) {
@@ -56,6 +58,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(it.next()), i);
         }
+        
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTEqual.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTEqual.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTEqual.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTEqual.java
Sat Jul 28 10:25:26 2007
@@ -48,6 +48,7 @@
         super(ExpressionParserTreeConstants.JJTEQUAL);
         jjtAddChild(path, 0);
         jjtAddChild(new ASTScalar(value), 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTGreater.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTGreater.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTGreater.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTGreater.java
Sat Jul 28 10:25:26 2007
@@ -44,6 +44,7 @@
         super(ExpressionParserTreeConstants.JJTGREATER);
         jjtAddChild(path, 0);
         jjtAddChild(new ASTScalar(value), 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTGreaterOrEqual.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTGreaterOrEqual.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTGreaterOrEqual.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTGreaterOrEqual.java
Sat Jul 28 10:25:26 2007
@@ -45,6 +45,7 @@
         super(ExpressionParserTreeConstants.JJTGREATEROREQUAL);
         jjtAddChild(path, 0);
         jjtAddChild(new ASTScalar(value), 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTIn.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTIn.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTIn.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTIn.java
Sat Jul 28 10:25:26 2007
@@ -43,6 +43,7 @@
         super(ExpressionParserTreeConstants.JJTIN);
         jjtAddChild(path, 0);
         jjtAddChild(list, 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLess.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLess.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLess.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLess.java
Sat Jul 28 10:25:26 2007
@@ -44,6 +44,7 @@
         super(ExpressionParserTreeConstants.JJTLESS);
         jjtAddChild(path, 0);
         jjtAddChild(new ASTScalar(value), 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLessOrEqual.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLessOrEqual.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLessOrEqual.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLessOrEqual.java
Sat Jul 28 10:25:26 2007
@@ -45,6 +45,7 @@
         super(ExpressionParserTreeConstants.JJTLESSOREQUAL);
         jjtAddChild(path, 0);
         jjtAddChild(new ASTScalar(value), 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLike.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLike.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLike.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLike.java
Sat Jul 28 10:25:26 2007
@@ -40,6 +40,7 @@
         super(ExpressionParserTreeConstants.JJTLIKE, false);
         jjtAddChild(path, 0);
         jjtAddChild(wrapChild(pattern), 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLikeIgnoreCase.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLikeIgnoreCase.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLikeIgnoreCase.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTLikeIgnoreCase.java
Sat Jul 28 10:25:26 2007
@@ -40,6 +40,7 @@
         super(ExpressionParserTreeConstants.JJTLIKEIGNORECASE, true);
         jjtAddChild(path, 0);
         jjtAddChild(wrapChild(pattern), 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTMultiply.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTMultiply.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTMultiply.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTMultiply.java
Sat Jul 28 10:25:26 2007
@@ -48,6 +48,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(nodes[i]), i);
         }
+        
+        connectChildren();
     }
 
     public ASTMultiply(Collection nodes) {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNegate.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNegate.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNegate.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNegate.java
Sat Jul 28 10:25:26 2007
@@ -44,6 +44,7 @@
     public ASTNegate(Object node) {
         super(ExpressionParserTreeConstants.JJTNEGATE);
         jjtAddChild(wrapChild(node), 0);
+        connectChildren();
     }
 
     /**

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNot.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNot.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNot.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNot.java
Sat Jul 28 10:25:26 2007
@@ -43,6 +43,7 @@
     public ASTNot(Node expression) {
         super(ExpressionParserTreeConstants.JJTNOT);
         jjtAddChild(expression, 0);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotBetween.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotBetween.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotBetween.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotBetween.java
Sat Jul 28 10:25:26 2007
@@ -42,6 +42,7 @@
         jjtAddChild(path, 0);
         jjtAddChild(new ASTScalar(value1), 1);
         jjtAddChild(new ASTScalar(value2), 2);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotEqual.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotEqual.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotEqual.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotEqual.java
Sat Jul 28 10:25:26 2007
@@ -44,6 +44,7 @@
         super(ExpressionParserTreeConstants.JJTNOTEQUAL);
         jjtAddChild(path, 0);
         jjtAddChild(new ASTScalar(value), 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotIn.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotIn.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotIn.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotIn.java
Sat Jul 28 10:25:26 2007
@@ -40,6 +40,7 @@
         super(ExpressionParserTreeConstants.JJTNOTIN);
         jjtAddChild(path, 0);
         jjtAddChild(list, 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotLike.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotLike.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotLike.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotLike.java
Sat Jul 28 10:25:26 2007
@@ -42,6 +42,7 @@
         super(ExpressionParserTreeConstants.JJTNOTLIKE, false);
         jjtAddChild(path, 0);
         jjtAddChild(new ASTScalar(value), 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotLikeIgnoreCase.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotLikeIgnoreCase.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotLikeIgnoreCase.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTNotLikeIgnoreCase.java
Sat Jul 28 10:25:26 2007
@@ -41,6 +41,7 @@
         super(ExpressionParserTreeConstants.JJTNOTLIKEIGNORECASE, true);
         jjtAddChild(path, 0);
         jjtAddChild(new ASTScalar(value), 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTOr.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTOr.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTOr.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTOr.java
Sat Jul 28 10:25:26 2007
@@ -46,6 +46,7 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild((Node) nodes[i], i);
         }
+        connectChildren();
     }
 
     public ASTOr(Collection nodes) {
@@ -55,6 +56,7 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild((Node) it.next(), i);
         }
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTSubtract.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTSubtract.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTSubtract.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/ASTSubtract.java
Sat Jul 28 10:25:26 2007
@@ -48,6 +48,7 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(nodes[i]), i);
         }
+        connectChildren();
     }
 
     public ASTSubtract(Collection nodes) {
@@ -57,6 +58,7 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(it.next()), i);
         }
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/SimpleNode.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/SimpleNode.java?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/SimpleNode.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/exp/parser/SimpleNode.java
Sat Jul 28 10:25:26 2007
@@ -252,6 +252,19 @@
      * Evaluates itself with object, pushing result on the stack.
      */
     protected abstract Object evaluateNode(Object o) throws Exception;
+    
+    /** 
+     * Sets the parent to this for all children.
+     * 
+     * @since 3.0 
+     */
+    protected void connectChildren() {
+        if (children != null) {
+            for (int i = 0; i < children.length; i++) {
+                children[i].jjtSetParent(this);
+            }
+        }
+    }
 
     protected Object evaluateChild(int index, Object o) throws Exception {
         return ((SimpleNode) jjtGetChild(index)).evaluate(o);

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt?view=diff&rev=560576&r1=560575&r2=560576
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt
Sat Jul 28 10:25:26 2007
@@ -12,6 +12,7 @@
 Date: 
 ----------------------------------
 CAY-818 Frontbase NUMERIC type mapping typo
+CAY-832 enum-mapped columns improperly handled in in expressions
 
 ----------------------------------
 Release: 2.0.3



Mime
View raw message