-
Bug
-
Resolution: Done
-
Major
-
2.7.0.Final
-
None
In JCR-SQL2, the standard way to quote an identifier (e.g., selector name, literal name, or literal path) is to use square brackets. (See section 6.7.23 in the JCR 2.0 specification.) However, when a path contains a same-name-sibling index, then the path literal also contains square brackets, and our parser gets confused. So this works:
SELECT * FROM [car:Car] WHERE ISDESCENDANTNODE([car:Car],[/foo/bar])
while this does not work (but should):
SELECT * FROM [car:Car] WHERE ISDESCENDANTNODE([car:Car],[/foo/bar[2]])
Note the confusing use of square brackets.