jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angela (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-2779) A jcr:uuid property added manually isn't attached to the parent node
Date Tue, 12 Oct 2010 13:20:35 GMT
A jcr:uuid property added manually isn't attached to the parent node
--------------------------------------------------------------------

                 Key: JCR-2779
                 URL: https://issues.apache.org/jira/browse/JCR-2779
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core
            Reporter: angela
             Fix For: 2.2.0


- take a nt:unstructured node without any mixins.
- set a property with name jcr:uuid
- the parent obtained from that property is the same as the test node (expected)
- the declaring node type of that property is nt:unstructured as expected

but:
- the property isn't new (instead it is modified) 
- there is no property-name entry for it in the parent node.

if it was illegal to add a jcr:uuid property that is not defined by mix:referenceable i would
expect
that the setProperty-call fails.

the following test illustrates the behaviour:

public void testAddJcrUUIDProperty() throws RepositoryException {
        Node testNode = testRootNode.addNode(nodeName2, "nt:unstructured");
        superuser.save();

        assertFalse(testNode.hasProperty("jcr:mixinTypes"));
        assertFalse(testNode.isNodeType(mixReferenceable));

        Property p = testNode.setProperty("jcr:uuid", superuser.getValueFactory().createValue(false));
        assertTrue(testNode.isSame(p.getParent()));
        assertEquals("nt:unstructured", p.getDefinition().getDeclaringNodeType().getName());

        assertTrue(p.isNew());
        assertTrue(testNode.hasProperty("jcr:uuid"));
    }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message