Alexander Klimetschek wrote:
On Mon, Feb 16, 2009 at 8:27 PM, Samuel Cox <[email protected]> wrote:
My users can change Ps or add Ns a bunch of times and we don't generally
care about those changes. However, at some point in time we want to take a
snapshot so that the current state of the hierarchy can be retrieved after
future edits.
What I've been doing is marking the nodes as versionable and the removing
the previous versions using VersionHistory.removeVersion(versionName).
Of course this gets kind of tricky. For example, if I change N4.P, then I
need to remove the versions created for N1, N3, and N4.
JCR actually supports nested versioning. Apart from the spec (section
8.2.11) [1], there is a nice introduction to JCR that includes a good
description of versioning and the (in this case important)
on-parent-version attribute [2].
[1] http://www.day.com/specs/jcr/1.0/
[2] http://jtoee.com/jsr-170/the_jcr_primer/5/
Thanks for the links. I looked through them and still have the same
question. All of the child nodes in my hierarchy have OPV=COPY. The
problem is that I only care about maintaining versions at specific
points in time (i.e. when someone takes a snapshot). To not grow the
VH, I am removing versions when changes occur. I was wondering if there
was some other way to do this or just plain foolishness...
--
Samuel Cox