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/ Regards, Alex -- Alexander Klimetschek [email protected]
