You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2023/04/12 07:20:00 UTC
[jira] [Resolved] (SLING-522) Default POST Servlet writes single-value property even though node type mandates multi-value.
[ https://issues.apache.org/jira/browse/SLING-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-522.
------------------------------------
Resolution: Won't Fix
> 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
> Affects Versions: Servlets Post 2.0.2
> Reporter: Julian Sedding
> Priority: Minor
> Attachments: propdef_lookup.diff
>
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)