[ https://issues.apache.org/jira/browse/SLING-8243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17324997#comment-17324997 ]
Jason Bailey edited comment on SLING-8243 at 4/19/21, 12:36 PM: ---------------------------------------------------------------- It's been 2 1/2 years since I touched this code and the overwrite and overwriteProperties were preexisting configurations. If I remember correctly, if you imported a node structure over an existing node structure without any directives set, It would just add new node's and properties starting from the top. So let's say the top node "A" with a child of "B" if you imported a new node of "A" that had a child of "C" it wouldn't do anything. "A" already exists so it doesn't get overwritten. Since it doesn't get overwritten it never gets to the child level to add "C". If set overwrite to true then your final result will be a top level node of "A" with two children of "B" and "C". If you then add the merge directive on your import the result will be a top level node of "A" with a singular child of "C" If you chose all 4 of the directives you would essentially be replacing the existing content with the new content. I'll see if I can pull together a diagram to explain it. was (Author: jeb): It's been 2 1/2 years since I touched this code and the overwrite and overwriteProperties were preexisting configurations. If I remember correctly, if you imported a node structure over an existing node structure without any properties set, It would just add new node's and properties starting from the top. So let's say the top node "A" with a child of "B" if you imported a new node of "A" that had a child of "C" it wouldn't do anything. "A" already exists so it doesn't get overwritten. Since it doesn't get overwritten it never gets to the child level to add "C". If set overwrite to true then your final result will be a top level node of "A" with two children of "B" and "C". If you then add the merge directive on your import the result will be a top level node of "A" with a singular child of "C" If you chose all 4 of the directives you would essentially be replacing the existing content with the new content. I'll see if I can pull together a diagram to explain it. > Content Loader - support merge of properties and child nodes > ------------------------------------------------------------ > > Key: SLING-8243 > URL: https://issues.apache.org/jira/browse/SLING-8243 > Project: Sling > Issue Type: New Feature > Reporter: Jason E Bailey > Assignee: Jason E Bailey > Priority: Major > Fix For: JCR ContentLoader 2.4.0 > > > Currently the Content Loader doesn't support a merge feature, a merge feature > would provide the ability for the an import to update existing properties and > nodes, and additionally delete the specific properties and nodes that aren't > imported. -- This message was sent by Atlassian Jira (v8.3.4#803005)