[
https://issues.apache.org/jira/browse/JCR-4680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17315403#comment-17315403
]
Angela Schreiber commented on JCR-4680:
---------------------------------------
[~reschke], my reading of JSR283 and in particular section _15.7.2 Restoring
Type and Identifier_ (copied below) is that the mixing types present with the
versionable node N must be replaced with the mixin types defined in the frozen
node of the version to be restored. I would conclude from this that any
property on N that is only defined by a mixin type present on N but not in F
must be removed.
{quote}
15.7.2 Restoring Type and Identifier
The primary type, mixin types and identifier of N are set as follows:
• [...]
• The jcr:mixinTypes property of N (and, semantically, the actual mixin node
types of N) is set to the value(s) recorded in the jcr:frozenMixinTypes of F.
{quote}
While section _15.7.3 Restoring Properties_ does talks about handling of
properties on N during the restore operation it doesn't specifically talks
about handling existing properties on N that no longer have a valid property
definition after primary type and mixin types have been restored from the
frozen node. But IMHO replacing the primary type and mixin types must
automatically be followed by removing any properties (and also child nodes)
that are no longer valid given the new effective nodetype created by restore
operation.
Hope that helps.
> ConstraintViolationException in VersionManagerImplRestore when target node
> has a property definition unknown by the frozen node
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: JCR-4680
> URL: https://issues.apache.org/jira/browse/JCR-4680
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: versioning
> Affects Versions: 2.20.2
> Reporter: Eduardo Perez Garcia
> Priority: Major
> Attachments: JCR-4680-test.diff, VersionManagerImplRestore.patch
>
>
> If we attempt to restore a frozen node from the version history, but the
> target node has new property definitions (mixins), we get a
> ConstraintViolationException because the properties of the new node are
> processed after replacing its mixins with the mixins from the frozen node.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)