[
https://issues.apache.org/jira/browse/SLING-522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604210#action_12604210
]
Carsten Ziegeler commented on SLING-522:
----------------------------------------
Looking at this issue, I'm not sure if this can be fixed easily. If the
property is a property defined on the primary node type, then it should get a
multi value
field. However if your node type inherits from nt:unstructured, jackrabbit will
use the property definition from nt:unstructured and therefore a single value
is created.
What do you think about extending the type hint? So you can send an additional
(hidden) parameter, defining that the property should be a multi value one.
Example: property is "paths", so you post "paths=hallo" and "[EMAIL PROTECTED]"
> Default POST Servlet writes single-value property even though node type
> mandates multi-value.
> ---------------------------------------------------------------------------------------------
>
> Key: SLING-522
> URL: https://issues.apache.org/jira/browse/SLING-522
> Project: Sling
> Issue Type: Bug
> Components: Servlets Post
> Affects Versions: 2.0.1
> Reporter: Julian Sedding
> Priority: Minor
> Fix For: 2.0.1
>
>
> If a JCR node-type defines a multi-value property (e.g. String[]) and only a
> single value for this property is posted, the property will become
> single-value (e.g String). The POST Servlet should check, if the property is
> multi-value and respect that. Otherwise, any code reading the property value
> would need to check, whether it is multi-value or not and handle both cases.
> It might even be beneficial to force a multi-value property, if there is no
> node-type that defines it. This would provide for better control of
> unstructured data.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.