You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Joel Richard (JIRA)" <ji...@apache.org> on 2014/09/16 22:49:33 UTC

[jira] [Created] (SLING-3943) Sling persistence API ignores jcr:createdBy property when creating JCR node

Joel Richard created SLING-3943:
-----------------------------------

             Summary: Sling persistence API ignores jcr:createdBy property when creating JCR node
                 Key: SLING-3943
                 URL: https://issues.apache.org/jira/browse/SLING-3943
             Project: Sling
          Issue Type: Bug
          Components: ResourceResolver
    Affects Versions: Resource Merger 1.1.0
            Reporter: Joel Richard


I have the following code:
{code}
                            Resource channelFolder = ResourceUtil.getOrCreateResource(resolver, socket.getNamespace().getName(), "sling:OrderedFolder", "sling:Folder", false);
                            Map<String, Object> props = new HashMap<String, Object>();
                            props.put("jcr:primaryType", "nt:unstructured");
                            props.put("jcr:description", msg);
                            props.put("jcr:createdBy", user);
                            resolver.create(channelFolder, System.currentTimeMillis() + "-" + user, props);
                            resolver.commit();
{code}
For whatever reason, the jcr:createdBy property isn't persisted. If I use the JCR API instead, the jcr:createdBy property is saved.

We use the sling resource resolver in version 1.1.1-R1618115.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)