[
https://issues.apache.org/jira/browse/OAK-713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13609094#comment-13609094
]
Jukka Zitting commented on OAK-713:
-----------------------------------
With such definition selection rules an application with such a
{{sling:AlmostUnstructured}} node type can't rely on the repository to
guarantee that a {{myProp}} property of such a node will contain either "foo"
or "bar" instead of some other value. It would be perfectly valid for
{{getProperty("myProp").getString()}} to return "baz" (if the property was
binary) or throw a {{ValueFormatException}} (if multi-valued).
IMO that's not a very useful way to interpret node types, and if possible I'd
rather fix this in Oak (ideally also in Jackrabbit) instead of carrying on
those semantics. With automatic conversion like suggested here this should be
possible with minimal impact on backwards compatibility.
Anyway, in revision 1459388 I changed the validation code to match the
Jackrabbit semantics for now until we have better consensus on this.
> Automatic property type conversion
> ----------------------------------
>
> Key: OAK-713
> URL: https://issues.apache.org/jira/browse/OAK-713
> Project: Jackrabbit Oak
> Issue Type: Sub-task
> Components: core, jcr
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Priority: Minor
>
> It would be nice if, instead of throwing a validation error, Oak could
> automatically do basic property type conversions that lose no content. For
> example a single value could automatically be transformed to a multi-valued
> property when required by the matching property definition.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira