[
https://issues.apache.org/jira/browse/OAK-1369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Mueller reopened OAK-1369:
---------------------------------
Reconsidering. It looks like this would be a major compatibility problem, as
there seem to be quite many cases where we rely on the old behavior. Also,
detection of missing "@" was incomplete (it was ignored in "order by jcr:path",
which was converted to "order by jcr:path/*" which is clearly not what the user
wanted).
I guess the easiest solution is to automatically add a "@", except for
"contains(data, 'x')" where "data" is considered to be a node and not a
property.
> XPath queries: fail if a @ is missing in front of property names
> ----------------------------------------------------------------
>
> Key: OAK-1369
> URL: https://issues.apache.org/jira/browse/OAK-1369
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core, query
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Fix For: 0.16
>
>
> XPath queries with conditions of the form {noformat}[id='test']{noformat} are
> not problematic. Jackrabbit 2.x interpreted such conditions as
> {noformat}[@id='test']{noformat}, and Oak currently interprets them as
> {noformat}[@id/* = 'test']{noformat}, as this is the expected behavior for
> conditions of the form {noformat}[jcr:contains(id, 'test')]{noformat}.
> I believe the condition {noformat}[id='test']{noformat} is illegal, and it
> would be better to throw an exception instead, saying a @ is missing.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)