-- Marek Slama [email protected]
---------- Původní zpráva ---------- Od: Joy <[email protected]> Datum: 8. 2. 2013 Předmět: Help to convert xpath to jcr SQl2 "Hi Can u plz help me to convert xpath : //wiki:encyclopedia/wiki:entry[@wiki:title = 'rose ' to JCR SQL is it like select * from [wiki:encyclopedia/wiki:entry] where wiki:title like 'rose' " No it is wrong AFAIK in FROM you give type if you do not have any specific type give there [nt:base] For property constraint just use = ie. equals. Path constraint use ischildnode. Look at http://svn.apache.org/viewvc/ jackrabbit/trunk/jackrabbit-spi-commons/src/test/resources/org/apache/ jackrabbit/spi/commons/query/sql2/test.sql2.txt?view=markup for examples. My version would be select * from [nt:base] where ischildnode([/wiki:encyclopedia/wiki:entry]) and title='rose' I recommend to use absolute path ie. starting with / it corresponds to original XPath. Hope it helps Marek " i want to get a hold on this Thanks Joy -- View this message in context: http://jackrabbit.510166.n4.nabble.com/Help-to -convert-xpath-to-jcr-SQl2-tp4657657.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com."
