jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: versioning a file
Date Mon, 11 Aug 2008 16:12:33 GMT

On Thu, Jul 24, 2008 at 7:35 PM, Michael Harris
<michael.e.harris@gmail.com> wrote:
> when a  node is versioned, what happens to child nodes?  Are they versioned
> to?

You can specify the behaviour in the node type definitions - have a
look at section "8.2.11 OnParentVersion Attribute" of the JCR spec.
For a quick overview, see here

> If you want to modify a child node, would you checkout the parent or the
> child?

If you add or remove child nodes, you have to modify the parent. To
change properties, you only modify the node with the properties. The
rest depends on the OnParentVersion attribute.

> So nt:file node has a child node nt:resource.  The content of the file is
> stored as a property of that resource.  To version the file, do you checkout
> the nt:file or the nt:resource?

Good question! Haven't done so my self, but since nt:resource has a
OPV=COPY you can do both. I would tend to make the nt:file a


Alexander Klimetschek

View raw message