-
Bug
-
Resolution: Done
-
Minor
-
3.7.2.Final, 3.7.3.Final, 3.7.4.Final, 3.8.0.Final, 4.0.0.Alpha4
After clear reference property value and again set it to same old value, referenced node lose backreference, method getReferences not return property.
Node referenceableNode = session.getRootNode().addNode("referenceable"); referenceableNode.addMixin(JcrMixLexicon.REFERENCEABLE.toString()); Node node1 = session.getRootNode().addNode("node1"); Property prop1 = node1.setProperty("prop1", session.getValueFactory().createValue(referenceableNode, false)); session.save(); // Do modifications node1.setProperty("prop1", (Value) null); node1.setProperty("prop1", session.getValueFactory().createValue(referenceableNode, false)); session.save(); PropertyIterator propertyIterator = referenceableNode.getReferences(); assertEquals(1, propertyIterator.getSize());