The XPATH query /jcr:root/content/companies/sortlandsavisa-5449/positions/test-stilling-5619/applications/application-Y7y8[1]/element(*,ka:asset)[@ka:assetType = 'comment'] order by @jcr:score
fails to convert properly to sql2 (with oak 1.1.6). Somehow "1(*)is not null" is added as a selector. javax.jcr.query.InvalidQueryException: java.text.ParseException: /jcr:root/content/companies/sortlandsavisa-5449/positions/test-stilling-5619/applications/application-Y7y8[1]/element(*,ka:asset)[@ka:assetType = 'comment'] order by @jcr:score converted to SQL-2 Query: select b.[jcr:path] as [jcr:path], b.[jcr:score] as [jcr:score], b.* from [nt:base] as a inner join [ka:asset] as b on ischildnode(b, a) where 1(*)is not null and issamenode(a, '/content/companies/sortlandsavisa-5449/positions/test-stilling-5619/applications/application-Y7y8') and b.[ka:assetType] = 'comment' order by b.[jcr:score] /* xpath: /jcr:root/content/companies/sortlandsavisa-5449/positions/test-stilling-5619/applications/application-Y7y8[1]/element(*,ka:asset)[@ka:assetType = 'comment'] order by @jcr:score */; expected: NOT, ( Is the XPATH query above wrong? -- -Tor
