[ 
https://issues.apache.org/jira/browse/OAK-999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13758913#comment-13758913
 ] 

Christan Keller commented on OAK-999:
-------------------------------------

To start, my myjor concern is not of the "proper" interpretation fo the Spec.
It is the compatibilty issue.
I only put into play as I hoped to get tome insight in the expectations t han.

My use case is: Iam ineressted in the node-type of one of thes OPV Copy Nodes 
in the Version.
While in Jackrabbit 2.0 i have to access it from the jcr:frozenPrimaryType 
while in Oak from the jcr:primaryType.

As I said the spec is not explicit about the nodeType.
Sure you can read "copy" as inluding the nodeType. Maybe the fact they 
mentioned the name will remain the same in this copy. 
(http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.13.3.5%20Frozen%20Node)
I have a tendency to interpret the spec to have intended that each version-Node 
has exactly on FrozenNode (of type nt:frozenNode)

Regardless of this, when it comes to spec-conformity, I think the chosen Oak 
solution is not consistent.
You have differnt interpretation for the word "copy" in case it is a 
mix:referenceable Node or not.


                
> Version creates frozenNode children with orignial NoteType instead of 
> frozenNode
> --------------------------------------------------------------------------------
>
>                 Key: OAK-999
>                 URL: https://issues.apache.org/jira/browse/OAK-999
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>    Affects Versions: 0.8
>            Reporter: Christan Keller
>
> For a Version the the children of a the Versions FrozenNode have the the 
> NodeType of their origin if they are not rferenceable. Expected is 
> nt:frozenNode.
> The JCR Spec is not explicit on the node-type for this Nodes but it is not 
> Compatible with JR2
> Dummy Test Case that just starts a Oak Repository
> {code}
> public class Issue extends RepositoryBaseTest {
>     @Test
>     public void testVersionChild() throws RepositoryException {
>         Session admin = getAdminSession();
>         Node parent = 
> admin.getRootNode().addNode(getClass().getSimpleName()+System.currentTimeMillis(),
>  JcrConstants.NT_UNSTRUCTURED);
>         Node child = parent.addNode("child");
>         parent.addMixin(JcrConstants.MIX_VERSIONABLE);
>         admin.save();
>         VersionManager vm = admin.getWorkspace().getVersionManager();
>         Version v = vm.checkin(parent.getPath());
>         Node frozenChild = v.getFrozenNode().getNode(child.getName());
>         Assert.assertEquals(JcrConstants.NT_FROZENNODE, 
> frozenChild.getPrimaryNodeType().getName());
>     }
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to