jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: node versioning
Date Tue, 15 Jul 2008 20:04:21 GMT
On 7/15/08, Richard Huddleston <rhuddusa@gmail.com> wrote:
> I'm a little confused when reading the JCR spec in regards to
>  versioning.  I understand that a node's properties can be versioned,
>  but what about the heirarchy of a node.  That is, if I moved a node
>  from parent A to parent B, how would this be reflected in versioning.

hi richard,
the way how the 'hierarchy' of a node, i.e. it's child nodes are
versioned depends on the on parent version (OPV) attribute of their
definitions (in the node type). for example:

+ foo version
+ bar copy

defines 'foo' with an OPV=version and 'bar' with OPV=copy

when you create a node A with childnodes 'foo' and 'bar' and make it
versionable (by adding mix:versionable), and then checkin A, the
entire tree of 'bar' is always copied into the version storage. if
'foo' itself is versionable, only a reference to it's version
hierarchy is recorded in the version of A. if 'foo' is not
versionable, it behaves like OPV=copy and it's entire subtree is
copied into the version.

on restore, the former OPV=copy child nodes are restored entirely,
where as the OPV=version nodes are left untouched, unless if they does
not exist anymore. then jackrabbit does restore the latest version of

so if you more a node below 'bar' and then restore A, that move will
be reverted.

regards, toby

View raw message