You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tomek Rękawek (JIRA)" <ji...@apache.org> on 2015/01/16 16:37:34 UTC
[jira] [Comment Edited] (SLING-4325) SlingQuery doesn't compare
multivalue properties
[ https://issues.apache.org/jira/browse/SLING-4325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14280328#comment-14280328 ]
Tomek Rękawek edited comment on SLING-4325 at 1/16/15 3:36 PM:
---------------------------------------------------------------
In the [pull request #55|https://github.com/apache/sling/pull/55] I've fixed the ResourcePropertyPredicate. Now it tries to adapt the property resource to {{String[]}} and checks if any element of the array accepts the predicate. I also updated the unit tests and JSON-based resource mocks).
was (Author: tomek.rekawek):
Created [pull request #55|https://github.com/apache/sling/pull/55]
> SlingQuery doesn't compare multivalue properties
> ------------------------------------------------
>
> Key: SLING-4325
> URL: https://issues.apache.org/jira/browse/SLING-4325
> Project: Sling
> Issue Type: Bug
> Components: Sling Query
> Affects Versions: Sling Query 2.0.0
> Reporter: Tomek Rękawek
> Fix For: Sling Query 2.0.2
>
>
> SlingQuery allows to filter resource by their properties, eg.:
> {code}
> $(resource).find("[myProperty=123]");
> {code}
> However, the {{ResourcePropertyPredicate}} class, responsible for extracting properties, doesn't support multivalue properties. For instance, if the {{myProperty}} above has many values, query won't return anything, even if one of the values indeed equals to 123.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)