This content has been marked as final.
Show 1 reply
-
1. Re: Querying for UUID using XPath
rhauch Dec 3, 2014 1:00 PM (in response to jkraushaar)Is the target node a 'mix:referenceable' node? If not, there really is no "jcr:uuid" property, but you could use the "mode:id" pseudocolumn that corresponds to Node.getIdentifier(). See the documentation for details.
If the target node is 'mix:referenceable', then make sure that you're using the correct literal value, which should correspond to Node.getUUID().
BTW, you can always check the query plan to see how ModeShape executes your query. Under the covers ModeShape converts XPath queries into JCR-SQL2, and the query plan will show the JCR-SQL2 representation. See this test case for finding a node by UUID using JCR-SQL and JCR-SQL2 (but not XPath).