jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Fw: node versionning and children
Date Tue, 06 Oct 2009 14:37:39 GMT
On Tue, Oct 6, 2009 at 14:19, Nicolas Brasseur
<nicolasbrasseur@yahoo.com> wrote:
> Does adding mix:versionable mixin force you to always checkin/checkout a node
> to modify it (and thus create a new version) or is it possible to modify such node
> without creating a new version ?

A new version is only created upon checkin(). checkout() is necessary
to edit a versionable node, ie. it will give you the "head" or current
version that is modifiable like any other node.

Between checkin() (version created) and checkout() it is read-only.
Between checkout() and the next checkin() you can change anything you
want on the node, multiple changes, multiple save() calls, etc. Note
that you have to call save() before checkin() to persist the changes.

Since it is common to have the (current head version of the) node
always editable, upon "create version" you'd typically do a checkin()
followed by an immediate checkout().


Alexander Klimetschek

View raw message