Jackrabbit version delete -- name is unexpected
        Posted  
        
            by Scudworth
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Scudworth
        
        
        
        Published on 2010-04-22T20:32:54Z
        Indexed on 
            2010/04/22
            20:43 UTC
        
        
        Read the original article
        Hit count: 393
        
jackrabbit
|jcr
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 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.
© Stack Overflow or respective owner