cayenne-commits mailing list archives

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

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

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

Modified: cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/trans/QueryAssemblerHelper.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/trans/QueryAssemblerHelper.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/trans/QueryAssemblerHelper.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/trans/QueryAssemblerHelper.java
Sat Jul 28 10:31:10 2007
@@ -63,6 +63,7 @@
 import org.objectstyle.cayenne.DataObject;
 import org.objectstyle.cayenne.ObjectId;
 import org.objectstyle.cayenne.exp.Expression;
+import org.objectstyle.cayenne.exp.parser.SimpleNode;
 import org.objectstyle.cayenne.map.DbAttribute;
 import org.objectstyle.cayenne.map.DbEntity;
 import org.objectstyle.cayenne.map.DbJoin;
@@ -321,8 +322,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTAdd.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTAdd.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTAdd.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTAdd.java
Sat Jul 28 10:31:10 2007
@@ -82,6 +82,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(nodes[i]), i);
         }
+        
+        connectChildren();
     }
 
     public ASTAdd(Collection nodes) {
@@ -91,6 +93,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTAnd.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTAnd.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTAnd.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTAnd.java
Sat Jul 28 10:31:10 2007
@@ -85,6 +85,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild((Node) nodes[i], i);
         }
+        
+        connectChildren();
     }
 
     public ASTAnd(Collection nodes) {
@@ -94,6 +96,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTBetween.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTBetween.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTBetween.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTBetween.java
Sat Jul 28 10:31:10 2007
@@ -79,6 +79,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTDivide.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTDivide.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTDivide.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTDivide.java
Sat Jul 28 10:31:10 2007
@@ -83,6 +83,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(nodes[i]), i);
         }
+        
+        connectChildren();
     }
 
     public ASTDivide(Collection nodes) {
@@ -92,6 +94,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTEqual.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTEqual.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTEqual.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTEqual.java
Sat Jul 28 10:31:10 2007
@@ -84,6 +84,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTGreater.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTGreater.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTGreater.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTGreater.java
Sat Jul 28 10:31:10 2007
@@ -80,6 +80,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTGreaterOrEqual.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTGreaterOrEqual.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTGreaterOrEqual.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTGreaterOrEqual.java
Sat Jul 28 10:31:10 2007
@@ -81,6 +81,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTIn.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTIn.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTIn.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTIn.java
Sat Jul 28 10:31:10 2007
@@ -79,6 +79,7 @@
         super(ExpressionParserTreeConstants.JJTIN);
         jjtAddChild(path, 0);
         jjtAddChild(list, 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLess.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLess.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLess.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLess.java
Sat Jul 28 10:31:10 2007
@@ -80,6 +80,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLessOrEqual.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLessOrEqual.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLessOrEqual.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLessOrEqual.java
Sat Jul 28 10:31:10 2007
@@ -81,6 +81,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLike.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLike.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLike.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLike.java
Sat Jul 28 10:31:10 2007
@@ -76,6 +76,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLikeIgnoreCase.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLikeIgnoreCase.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLikeIgnoreCase.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTLikeIgnoreCase.java
Sat Jul 28 10:31:10 2007
@@ -76,6 +76,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTMultiply.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTMultiply.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTMultiply.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTMultiply.java
Sat Jul 28 10:31:10 2007
@@ -84,6 +84,8 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(nodes[i]), i);
         }
+        
+        connectChildren();
     }
 
     public ASTMultiply(Collection nodes) {

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

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

Modified: cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotBetween.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotBetween.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotBetween.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotBetween.java
Sat Jul 28 10:31:10 2007
@@ -78,6 +78,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotEqual.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotEqual.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotEqual.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotEqual.java
Sat Jul 28 10:31:10 2007
@@ -80,6 +80,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotIn.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotIn.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotIn.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotIn.java
Sat Jul 28 10:31:10 2007
@@ -76,6 +76,7 @@
         super(ExpressionParserTreeConstants.JJTNOTIN);
         jjtAddChild(path, 0);
         jjtAddChild(list, 1);
+        connectChildren();
     }
 
     protected Object evaluateNode(Object o) throws Exception {

Modified: cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotLike.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotLike.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotLike.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotLike.java
Sat Jul 28 10:31:10 2007
@@ -78,6 +78,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotLikeIgnoreCase.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotLikeIgnoreCase.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotLikeIgnoreCase.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTNotLikeIgnoreCase.java
Sat Jul 28 10:31:10 2007
@@ -77,6 +77,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTOr.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTOr.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTOr.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTOr.java
Sat Jul 28 10:31:10 2007
@@ -82,6 +82,7 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild((Node) nodes[i], i);
         }
+        connectChildren();
     }
 
     public ASTOr(Collection nodes) {
@@ -91,6 +92,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTSubtract.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTSubtract.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTSubtract.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/ASTSubtract.java
Sat Jul 28 10:31:10 2007
@@ -84,6 +84,7 @@
         for (int i = 0; i < len; i++) {
             jjtAddChild(wrapChild(nodes[i]), i);
         }
+        connectChildren();
     }
 
     public ASTSubtract(Collection nodes) {
@@ -93,6 +94,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-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/SimpleNode.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/SimpleNode.java?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/SimpleNode.java
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/exp/parser/SimpleNode.java
Sat Jul 28 10:31:10 2007
@@ -232,6 +232,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-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.4.txt
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.4.txt?view=diff&rev=560577&r1=560576&r2=560577
==============================================================================
--- cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.4.txt
(original)
+++ cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.4.txt
Sat Jul 28 10:31:10 2007
@@ -11,3 +11,4 @@
 Bug Fixes:
 
 CAY-818 Frontbase NUMBERIC type mapping typo
+CAY-832 enum-mapped columns improperly handled in in expressions



Mime
View raw message