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: Question about not case-sensitive querying
Date Thu, 16 Mar 2006 17:22:25 GMT
Alexandru Popescu wrote:
> Is this gonna work with multi-value properties? This is my problem. Because
> doing [@my:property = 1] would mean to me: does the property have the value
> 1, and not does the property contain the value 1 (as would be the case for
> mult-value properties).

this depends which one of the comparison operators you are using ;)

XPath defines 'value comparison' (operators like: eq, gt, lt, ne) and 
'general comparison' (operators like: =, >, >, !=). The difference 
basically is, that value comparison only returns true for a comparison 
if the property is single valued and general comparison works for both 
single and multi valued properties. In case of a multi valued property a 
general comparison will return true if at least one of the values 
returns true for that comparison.

e.g. if you have my:property = [1,2,3]

@my:property eq 1 -> false
@my:property = 1 -> true
@my:property != 2 -> true

See also JCR spec section


View raw message