jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OAK-249) Add support for auto created properties
Date Thu, 16 Aug 2012 06:56:37 GMT
Chetan Mehrotra created OAK-249:

             Summary: Add support for auto created properties
                 Key: OAK-249
                 URL: https://issues.apache.org/jira/browse/OAK-249
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: jcr
    Affects Versions: 0.5
            Reporter: Chetan Mehrotra

While trying to run Sling with Oak PathNotFoundException are seen with  properties like jcr:createdBy,
jcr:created etc while accessing a node of type nt:file. It appears that current node creation
logic is not generating the default properties as defined in the nodetype.

    public void testDefaultProperties() throws RepositoryException {
        Node testRootNode = getNode(TEST_PATH);
        Node fileNode = testRootNode.addNode("foo.png","nt:file");
        Binary b = testRootNode.getSession().getValueFactory().createBinary(new ByteArrayInputStream("abcdefgh".getBytes()));
        Node contentNode = fileNode.addNode("jcr:content","nt:resource");

        Node cn = testRootNode.getNode("foo.png");

Above testcase fails with oak but passes with Jackrabbit. Most probably the logic present
in org.apache.jackrabbit.core.NodeTypeInstanceHandler#computeSystemGeneratedPropertyValues
has to be ported to Oak

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message