Hi Shane,

jsr 170 only supports values of single-valued properties in the result row. See section 6.6.3.1. of the spec.

The JCR API does not have methods to retrieve multi-valued properties out of a row. There is only:
- Row.getValue(String propertyName)
- Row.getValues()

Where the latter simply puts the value for each selected (sinlge-valued) property into an array and returns it.

As you described, the workaround is to get the node and call getProperty(propName).getValues()

regards
 marcel

Shane Preater wrote:
Hi,

I am trying to perform the following query:
/jcr:root/some/path/(@lastName, @articles)
On the 1.1.1 RMI jackrabbit service running on
rmi:localhost:1099/jackrabbit.repository

The problem I am getting is that the 'articles' property is multi-valued and
when I call the RowIterator method getValues("articles");
on the returned rows it always fails with a NullPointerException. However if
I obtain the node via the 'jcr:path' value returned and then call
node.getProperty("articles").getValues(); This returns the correct values.

Is there an issue with querying properties with multiple values in the XPath query engine? I know that predicating properties with multivalues works as I
am also doing the following:
/jcr:root/some/path/[EMAIL PROTECTED] 'aabb-aabbdd-a2203a'] which returns all the
nodes which have the uuid as one of their articles.

Thanks for any help.
Shane Preater.


Reply via email to