jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra (JIRA)" <j...@apache.org>
Subject [jira] Closed: (JCR-469) Problem with child order after restoring of parent
Date Fri, 23 Jun 2006 08:15:30 GMT
     [ http://issues.apache.org/jira/browse/JCR-469?page=all ]
     
Tobias Bocanegra closed JCR-469:
--------------------------------

    Fix Version: 1.1
     Resolution: Fixed

fixed.

Date: Fri Jun 23 01:14:31 2006
New Revision: 416629


> Problem with child order after restoring of parent
> --------------------------------------------------
>
>          Key: JCR-469
>          URL: http://issues.apache.org/jira/browse/JCR-469
>      Project: Jackrabbit
>         Type: Bug

>   Components: versioning
>     Versions: 1.1
>  Environment: jre 1.5.0_05, jackrabbit trunk (416297)
>     Reporter: Tanju Erinmez
>     Assignee: Tobias Bocanegra
>     Priority: Critical
>      Fix For: 1.1

>
> The following sequence leads to swapped child nodes in the mentioned trunk version (this
worked in 1.0.1).
> Specifically:
> Add nodes:
>  parent
>    childA
>    childB
> Remove childA:
>  parent
>    childB
> Restore initial version:
>  parent
>    childB
>    childA
> The parent node is of type nt:unstructured which carries an
> OrderableChildNodes=true so I would assume that upon restoring the order
> would be preserved.
> Cheers,
> Tanju
> --------------
> TESTCASE used with both Derby & InMemPMs (boiled down beyond sense :)
> // Add parent & childA, childB
> Node parent = session.getRootNode().addNode("parent", "nt:unstructured");
> parent.addMixin("mix:versionable");
> Node c1 = parent.addNode("childA", "nt:unstructured");
> c1.addMixin("mix:versionable");
> Node c2 = parent.addNode("childB", "nt:unstructured");
> c2.addMixin("mix:versionable");
> session.save();
> c1.checkin();
> c2.checkin();
> Version v1 = parent.checkin();
> // OK : parent.getNodes() -> childA, childB
> // Remove childA
> parent = session.getRootNode().getNode("parent");
> parent.checkout();
> c1 = parent.getNodes().nextNode();
> c1.checkout();
> c1.remove();
> session.save();
> Version v2 = parent.checkin();
> // OK : parent.getNodes() -> childA, childB
> // Remove childA
> parent = session.getRootNode().getNode("parent");
> parent.restore(v1, true);
> // Not OK : parent.getNodes() -> childB, childA

-- 
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


Mime
View raw message