jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r577704 - /jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
Date Thu, 20 Sep 2007 12:01:41 GMT
Author: jukka
Date: Thu Sep 20 05:01:40 2007
New Revision: 577704

URL: http://svn.apache.org/viewvc?rev=577704&view=rev
Log:
1.3: Merged revision 570098 (JCR-1090)

Modified:
    jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java

Modified: jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java?rev=577704&r1=577703&r2=577704&view=diff
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
(original)
+++ jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
Thu Sep 20 05:01:40 2007
@@ -237,7 +237,11 @@
             }
         }
 
-        if (constraintNode.getNumOperands() > 0) {
+        if (constraintNode.getNumOperands() == 1) {
+            // attach operand to last path step
+            LocationStepQueryNode[] steps = pathNode.getPathSteps();
+            steps[steps.length - 1].addPredicate(constraintNode.getOperands()[0]);
+        } else if (constraintNode.getNumOperands() > 1) {
             // attach constraint to last path step
             LocationStepQueryNode[] steps = pathNode.getPathSteps();
             steps[steps.length - 1].addPredicate(constraintNode);



Mime
View raw message