jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Bocanegra <tri...@day.com>
Subject Re: after deleting version, name is unexpected
Date Thu, 22 Apr 2010 21:15:57 GMT
hi,
i don't really understand what you try to accomplish.
the version names can currently not be controlled via jcr but are
generated automatically.
if you need user defined "names", use version labels.

regards, toby

On Thu, Apr 22, 2010 at 10:43 PM, Cinnamon Scudworth
<principalscudworth@gmail.com> wrote:
> I'm using Apache Jackrabbit to store versioned data. I'm following the
> template listed on the Jackrabbit wiki for versioning basics, but
> there's one thing that isn't working as expected.
>
> After I run the code from the wiki, I try saving another version of
> the node, then getting its version string:
>
> child = parentNode.getNode("childNode");
> child.checkout();
> child.setProperty("anyProperty", "Blah3");
> session.save();
> Version thisVersion = child.checkin();
> System.out.println(thisVersion.getName());
>
> The output of this code is 1.0.0 , when I want it to be 1.1 . My goal
> is to be able to remove the last -- and only the last -- version of a
> node, and have the next saved and checked in version have the same
> name as the removed version. I only care about doing this when the
> node is being added; if I can check in the node, and read the name (to
> get the version number) without an exception being thrown, I'm fine
> with not being able to remove the version. Looking around the
> internet, I can't find a way to accomplish this.
>
> Thanks,
>  Scudworth
>

Mime
View raw message