You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2015/03/13 09:20:39 UTC

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

     [ https://issues.apache.org/jira/browse/SLING-3943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated SLING-3943:
------------------------------------
    Affects Version/s:     (was: Resource Resolver 1.1.0)

> 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: JCR
>            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)