jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: bug in SQL Query
Date Tue, 03 Oct 2006 18:39:37 GMT
Paco Avila wrote:
> I make this query:
> 
> 	SELECT * FROM okm:document WHERE jcr:path LIKE '/okm:root/%' OR
> 	jcr:path='/okm:root'
> 
> and this exception is thrown:
> 
> 	Invalid combination of jcr:path clauses
> 
> But the specification says in 8.5.2.2 that this is a valid query (page
> 289).

I think this is actually an error in the specification. At the same 
time the specification also says that only the XPath axis that can be 
expressed in the abbreviated syntax are mandatory. The above query 
cannot be translated into an XPath statement simply using the 
abbreviated axis syntax.

Jackrabbit supports the following query, but it is quite different 
from what you want to achieve:

/foo//bar

this would translate into the following SQL statement that should work 
in jackrabbit:

select * from nt:base where jcr:path = '/foo/bar' or jcr:path like 
'/foo/%/bar'


regards
  marcel

Mime
View raw message