You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Edgar Merino <do...@gmail.com> on 2009/02/05 02:28:18 UTC
Query multi-valued properties
Hello,
I've got a node that contains a multi-valued property (containing
references to other nodes), how can I query for nodes with specific
properties? [jcr:contains(@mymultiprops, 'uuid')] doesn't work
(substitute uuid with the actual uuid of the referenced node).
Thanks in advance,
Edgar Merino
Re: Query multi-valued properties
Posted by Charles Brooking <pu...@charlie.brooking.id.au>.
Edgar Merino wrote:
> I've got a node that contains a multi-valued property (containing
> references to other nodes), how can I query for nodes with specific
> properties? [jcr:contains(@mymultiprops, 'uuid')] doesn't work
> (substitute uuid with the actual uuid of the referenced node).
It's just [@mymultiprops='uuid'], which is true if any value in the
multivalued property is equal to 'uuid'. This is like "general
comparisons" in normal XPath.
See Section 6.6.4.10 Searching Multi-value Properties of the JCR 1.0 spec.
Later
Charlie
RE: Query multi-valued properties
Posted by Ard Schrijvers <a....@onehippo.com>.
Hello,
> Hello,
>
> I've got a node that contains a multi-valued property
> (containing references to other nodes), how can I query for
> nodes with specific properties?
Not entirely sure if I understand you correctly, but you do not mean
//*[@mymultiprops] ? Now you get all nodes containing the property
'mymultiprops'
Regards Ard
> [jcr:contains(@mymultiprops,
> 'uuid')] doesn't work (substitute uuid with the actual uuid
> of the referenced node).
>
> Thanks in advance,
> Edgar Merino
>