[
https://issues.apache.org/jira/browse/SLING-1627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Norman resolved SLING-1627.
--------------------------------
Fix Version/s: Servlets Post 2.0.6
Launchpad Testing 6
JCR ContentLoader 2.0.8
Resolution: Fixed
Thanks for the updated patch. I cleaned things up a bit and committed the
changes in r983135.
I changed the names of the request param and directive from what was in the
patch, updated some javadocs and added an additional integration test.
Please verify the changes work for you.
> import operation does not respect :replace=true for properties
> --------------------------------------------------------------
>
> Key: SLING-1627
> URL: https://issues.apache.org/jira/browse/SLING-1627
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Reporter: Zach A. Thomas
> Assignee: Eric Norman
> Fix For: Servlets Post 2.0.6, Launchpad Testing 6, JCR
> ContentLoader 2.0.8
>
> Attachments: SLING-1627.patch, SLING-1627v2.patch
>
>
> If I want to import some JSON and then update it with a subsequent POST
> (using the :replace=true flag), the nodes are updated, but not the properties.
> curl -u admin:admin -F":operation=import" -F":contentType=json"
> -F':content={"columns": {"one":"value"}, "layout": "dev"}'
> http://localhost:8080/dashboard
> If I do a subsequent POST with the :replace parameter:
> curl -u admin:admin -F":operation=import" -F":contentType=json"
> -F':content={"columns": {"one":"love"}, "layout": "dev"}' -F":replace=true"
> http://localhost:8080/dashboard
> The columns object is updated, but the layout property is not. I tracked this
> down to Sling's DefaultContentCreator, whose createProperty method expressly
> won't overwrite a property if it already exists.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.