Status: Closed (View Workflow)
Affects Version/s: 2.5.0.Final
I have a node N, mix:versionable, with children OPV COPY.
The versions of N are correct, including the children of the frozen node.
The trouble happens when restoring, using VersionManager.restore(Version arg0, boolean arg1): the frozen node is properly restored, but the children have no mixins, and no UUID anymore.
This happens because of shouldRestoreMixinsAndUuid==false on line 1095 of JcrVersionManager.java.
This variable equals false because the children's primaryType isn't jcr:frozenNode (line 1072 of the same file).
So in my opinion, either the children has to be frozen like the root, and old primaryType has to be frozen like the root, either the test of the line 1072 has to change its condition.
As asked by Randall Hauch, here is the path taken to reach the buggy code:
Daemon Thread [http-localhost%2F127.0.0.1-8080-3] (Suspended (breakpoint at line 1095 in JcrVersionManager$RestoreCommand))
JcrVersionManager$RestoreCommand.restoreNode(AbstractJcrNode, AbstractJcrNode, DateTime) line: 1095
JcrVersionManager$RestoreCommand.execute() line: 941
JcrVersionManager.restore(Path, Version, String, boolean) line: 670
JcrVersionManager.restore(Version, boolean) line: 1792
JCRManagerImpl.restoreNodeVersion(Session, Location, Location) line: 578 //My code.