Hi tobias now the base version can not be removed, is it the expected behaviour?. Shouldn't the user be able to remove it and jackrabbit should repair the versionhistory and set the base version to the predecessor?.
br, edgar On 10/3/05, Tobias Strasser (JIRA) <[EMAIL PROTECTED]> wrote: > [ http://issues.apache.org/jira/browse/JCR-232?page=all ] > > Tobias Strasser resolved JCR-232: > --------------------------------- > > Resolution: Fixed > > Author: tripod > Date: Mon Oct 3 02:55:40 2005 > New Revision: 293286 > > > > jcr:baseVersion is not updated when the base version is removed from the > > version history > > ---------------------------------------------------------------------------------------- > > > > Key: JCR-232 > > URL: http://issues.apache.org/jira/browse/JCR-232 > > Project: Jackrabbit > > Type: Bug > > Components: versioning > > Reporter: Edgar Poce > > Assignee: Tobias Strasser > > Fix For: 1.0 > > > > > Session s1 = repo.login(new SimpleCredentials("user1", > > "pwd1".toCharArray())); > > Node root1 = s1.getRootNode() ; > > Node test1 = root1.addNode("test") ; > > test1.addMixin("mix:versionable"); > > s1.save() ; > > > > System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) > > ; > > test1.checkin() ; > > > > System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) > > ; > > test1.getVersionHistory().removeVersion("1.0") ; > > // the base version wasn't updated :( > > > > System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) > > ; > > // the next line throws ItemNotFoundException :( > > test1.getBaseVersion() ; > > javax.jcr.ItemNotFoundException: c33bf049-c7e1-4b34-968a-63ff1b1113b0 > > at > > org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:498) > > at > > org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:349) > > at > > org.apache.jackrabbit.core.PropertyImpl.getNode(PropertyImpl.java:642) > > at > > org.apache.jackrabbit.core.NodeImpl.getBaseVersion(NodeImpl.java:2960) > > at > > org.apache.jackrabbit.core.RemoveVersionTest.main(RemoveVersionTest.java:56) > > -- > This message is automatically generated by JIRA. > - > If you think it was sent incorrectly contact one of the administrators: > http://issues.apache.org/jira/secure/Administrators.jspa > - > For more information on JIRA, see: > http://www.atlassian.com/software/jira > >
