jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-5229) Using Node.setPrimaryType() should fail if non-matching childnodes
Date Tue, 21 Feb 2017 08:18:44 GMT

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

Alex Parvulescu commented on OAK-5229:
--------------------------------------

bq. Especially the reference properties of mix:Versionable should be removed, since they might
now point to a node in the version store that no longer exists.
To clarify here, if you don't take care of manually removing the extra properties, the commit
would _fail_ because of the existing references (see the {{MixinTest}} tests in the patch).
At no point would you have broken links, so the repo remains consistent from this pov.

> Using Node.setPrimaryType() should fail if non-matching childnodes
> ------------------------------------------------------------------
>
>                 Key: OAK-5229
>                 URL: https://issues.apache.org/jira/browse/OAK-5229
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.5.14
>            Reporter: Tobias Bocanegra
>            Assignee: Alex Parvulescu
>            Priority: Critical
>             Fix For: 1.8, 1.6.1
>
>         Attachments: OAK-5229.patch, OAK-5229-tests.patch, OAK-5229-v2.patch, OAK-5229-v3.patch,
OAK-5229-v4.patch, OAK-5229-v5.patch
>
>
> 1. Assume the following:
> {noformat}
> /testNode [nt:unstructured]
>   /unstructured_child [nt:unstructured]
> {noformat}
> 2. setting "/testNode".setPrimaryType("nt:folder")
> 3. save the session.
> Altering the primary type works, thus leaving the repository in an inconsistent state.
> Interestingly, subsequent calls to "/testNiode/unstructured_child".setProperty() will
fail:
> {noformat}
> javax.jcr.nodetype.ConstraintViolationException: OakConstraint0001: /test_node[[nt:folder]]:
No matching definition found for child node unstructured_child with effective type [nt:unstructured]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message