You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2013/09/05 11:14:54 UTC

[jira] [Resolved] (OAK-995) XPath: allow using RowIterator Row.getPath() for all queries

     [ https://issues.apache.org/jira/browse/OAK-995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Mueller resolved OAK-995.
--------------------------------

    Resolution: Fixed

Revision 1520258
                
> XPath: allow using RowIterator Row.getPath() for all queries
> ------------------------------------------------------------
>
>                 Key: OAK-995
>                 URL: https://issues.apache.org/jira/browse/OAK-995
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr, query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Minor
>
> For some slightly complex XPath queries, when using the RowIterator, the method Row.getPath() currently throws an exception. Example:
> {code}
> //hello[@x=1]/*[@y=1]
> {code}
> The problem is that this XPath query is converted to a SQL-2 query with more than one selector. When calling Row.getPath(), the method doesn't know which selector should be used.
> When using the NodeIterator (using getNodes), there is a workaround in the code (a "TODO"), but it is rather ugly. 
> Instead of using this workaround, it would be better to check the select column list, and if there is only one selector (which is the case for XPath queries), use that one.

--
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