[ 
https://issues.apache.org/jira/browse/OAK-830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13662844#comment-13662844
 ] 

Thomas Mueller commented on OAK-830:
------------------------------------

Revision 1484719 (simplified)
                
> XPathToSQL2Converter fails to wrap or clauses
> ---------------------------------------------
>
>                 Key: OAK-830
>                 URL: https://issues.apache.org/jira/browse/OAK-830
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Alex Parvulescu
>            Assignee: Thomas Mueller
>             Fix For: 0.8
>
>
> There are some xpath queries that contain some 'or' clauses which are not 
> properly converted to sql2:
> For example
> {code}
> /jcr:root/home//test/* [@type='t1' or @type='t2' or @type='t3']
> {code}
> turns into 
> {code}
> select b.[jcr:path] as [jcr:path], b.[jcr:score] as [jcr:score], b.* from 
> [nt:base] as a inner join [nt:base] as b on ischildnode(b, a) where (name(a) 
> = 'test' and isdescendantnode(a, '/home')) and b.[type] = 't1' or b.[type] = 
> 't2') or b.[type] = 't3' /* xpath: /jcr:root/home//test/* [@type='t1' or 
> @type='t2' or @type='t3'] */
> {code}
> Notice how the 3 'or's should be wrapped into parenthesis, otherwise the 
> resulting query is simply wrong.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to