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: More questions about versioning
Date Thu, 17 Aug 2006 07:20:58 GMT
hi JavaJ

> 1) Is there a way to "rollback" to a previous version?  I know that there is
> a "restore" function, but from the spec, it looks like it just copies the
> state of the versioned node into the node object.  What I'm interested in is
> being able to rollback to a previous version V and then basically remove all
> successor versions of V, making V the most recent version for the node.
this is what 'restore' does. it restores the state of the node. it
further adjusts the 'jcr:baseVersion' of the node, i.e. the current
version of the node. if you checkout/checkin the node later, you
create a new version branch. the checkin/restore operation is
explained very detailed in the jsr170 spec.

> 2) What happens when you version a node with a reference property that
> points to another node?  I assume that the only thing that gets versioned is
> just the uuid of the referenced node?
right.
> So basically it doesn't keep the
> state of the referenced node at the time you versioned the node.  For
> example, if you have NodeA with a property R1 that references NodeB.  You
> modify and checkin a new version V1 of NodeA.  Next, you modify NodeB and
> save it.  Then you modify and checkin a new version V2 of NodeA.  If you
> then decide to restore NodeA to version V1 and get property R1, will the
> referenced node contain the state of the current base version of NodeB or
> its state when V1 was first created (e.g before you modified it)?  I assume
> the former...
yes. you explicility need to checkin the target node. if you want to
checkin a 'collection' of versions, you need a separate mechanism to
version/restore them consistently. in jsr283, we will introduce
baselines, activities and changeset that allow those opeations.

regards, toby
-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message