Author: jens
Date: Tue Feb 14 13:51:01 2017
New Revision: 1782964

URL: http://svn.apache.org/viewvc?rev=1782964&view=rev
Log:
query parser: allow selecting secondary properties in simple queries
Fix bug: https://issues.apache.org/jira/browse/CMIS-1012

Modified:
    
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java

Modified: 
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java
URL: 
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java?rev=1782964&r1=1782963&r2=1782964&view=diff
==============================================================================
--- 
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java
 (original)
+++ 
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java
 Tue Feb 14 13:51:01 2017
@@ -407,7 +407,7 @@ public class QueryObject {
         }
         return secondaryTypeIds;
     }
-
+    
     // ///////////////////////////////////////////////////////
     // resolve types after first pass traversing the AST is complete
 
@@ -558,14 +558,11 @@ public class QueryObject {
                 tdFound = td;
             }
         }
-        if (noFound == 0) {
-            throw new CmisQueryException(propName + " is not a property query 
name in any of the types in from ...");
-        } else if (noFound > 1 && !isStar) {
+        
+        if (noFound > 1 && !isStar) {
             throw new CmisQueryException(propName + " is not a unique property 
query name within the types in from ...");
-        } else {
-            if (null != tdFound) {
-                validateColumnReferenceAndResolveType(tdFound, colRef);
-            }
+        } else if (null != tdFound) {
+               validateColumnReferenceAndResolveType(tdFound, colRef);
         }
     }
 


Reply via email to