Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
Description
Method DefaultJcrContentNodeBinder#bind() has this piece of code to delete existing compounds, before re-adding the compounds based on the incoming contentNode POJO
for (ContentNode childContentNode : contentNode.getNodes()) { if (itemFilter != null && !itemFilter.accept(childContentNode)) { continue; } for (Node sameNameTypeChildNode : findChildNodesByNameAndType(jcrDataNode, childContentNode)) { sameNameTypeChildNode.remove(); } }
The problem here is that the deletions are also based on incoming contentNode POJO's compounds, so if the POJO does not contain a certain name/type, but the actual JCR node does, it will not get deleted from the JCR node.
Cases where this occurs:
A) Content blocks field with compounds A and B: add A, B, A; binding is OK, then remove B, binding will not remove B
B) Multiple compound field: add A1 + A2, binding is OK, then remove A2, binding is OK, then remove A1, binding will not remove A1
C) Optional compound field: add B1, binding is OK, then remove B1, binding will not remove B1
Attachments
Issue Links
- is awaited by
-
FORGE-157 Content EXIM; bump JCR-binding plugin version
- Closed