[
https://issues.apache.org/jira/browse/OAK-8048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17045737#comment-17045737
]
Julian Reschke commented on OAK-8048:
-------------------------------------
{quote}I think that would violate the specification. The version history nodes
are protected.
{quote}
<https://docs.adobe.com/content/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.13.5.1%20nt:versionHistory>
- maybe in Oak, but not requried by the spec. That said, child nodes of
protected nodes are protected as well, yet we allow removing versions.
{quote}With the proposed patch, I'm wondering what happens when there is a
versionable node with the root version as the base version. Wouldn't the code
remove the version history when the last non-root version is removed?
{quote}
Funny you mention that. I tried to do that in a test, but couldn't come up with
a way to have a non-empty version history where the base version is the root
version. Do have something in mind how to get there?
> VersionHistory not removed when removing node and all its versions
> ------------------------------------------------------------------
>
> Key: OAK-8048
> URL: https://issues.apache.org/jira/browse/OAK-8048
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Affects Versions: 1.8.9
> Reporter: Marco Piovesana
> Assignee: Julian Reschke
> Priority: Major
> Attachments: OAK-8048-test.diff, OAK-8048.diff, fix-OAK-8048.patch
>
>
> Hi all,
> I'm trying to delete a node and all its versions, but the version history is
> not removed. I'm doing the following steps (as described in OAK-4370 and
> JCR-134):
> # retrieve the version history
> # delete the node and save the session
> # delete all versions except for the base version
> # save the session
> The versions are all gone but the versionHistory node, and the base version
> node, are still there. Am I doing something wrong?
> The only test related to this that I found is
> {{ReadOnlyVersionManagerTest.testRemoveEmptyHistoryAfterRemovingVersionable}}.
> It does work, but uses Oak related classes and not the JCR interface.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)