You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Angela Schreiber (Jira)" <ji...@apache.org> on 2021/06/08 10:14:00 UTC

[jira] [Commented] (SLING-10463) Repoinit fails to create node if property already exists at the same path

    [ https://issues.apache.org/jira/browse/SLING-10463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17359226#comment-17359226 ] 

Angela Schreiber commented on SLING-10463:
------------------------------------------

[~rma61870@adobe.com], [~bdelacretaz], just a minor comment from a JCR point of view: whether or not same-name-property-and-node are allowed at the same parent node is subject to the repository implementation and there exists a dedicated descriptor for that ({{Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED}}. i am not sure if repo-init should care and check if an item with the same name but different item-type already exists but it might be worth thinking about it... having a node and a property with the same name might introduce unintended regressions as we saw with the case that made this bug surface in the first place.

a more conservative approach to the proposed patch would be to leave the {{Session.itemExists}} but verify that it actually is a node and fail the repo-init if it is a property.

> Repoinit fails to create node if property already exists at the same path
> -------------------------------------------------------------------------
>
>                 Key: SLING-10463
>                 URL: https://issues.apache.org/jira/browse/SLING-10463
>             Project: Sling
>          Issue Type: Bug
>          Components: Repoinit
>            Reporter: Tom Blackford
>            Priority: Minor
>         Attachments: SLING-10463.patch
>
>
> If a property already exists at the path of a node described in repoinit, then the repoinit will incorrectly assume the node does not need to be created. 
> Test case & fix -  [^SLING-10463.patch] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)