-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
3.8.1.Final
I add custom type and properties when creating a node at external resource (file system). After session.save(), I want to change custom properties value. However, the previous value does not change.
External resource configuration:
/subsystem=modeshape/repository=samplerepository/source=sampleextsource:add(classname="org.modeshape.connector.filesystem.FileSystemConnector",properties=[{"directoryPath"=>"/somewhere"}], readonly="false",projections=["default:/extsource => /"], cacheTtlSeconds="1")
Reading and updating property values:
// Creating custom type and property NodeTypeManager ntm = ... NodeTypeTemplate ntt = ntm.createNodeTypeTemplate(); ntt.setName("sometype"); ntt.setMixin(true); PropertyDefinitionTemplate pdt = ntm.createPropertyDefinitionTemplate(); pdt.setName("someproperty"); pdt.setRequiredType(PropertyType.STRING); ntt.getPropertyDefinitionTemplates().add(pdt); ntm.registerNodeType(ntt, true); ... Node node = ... node.addMixin("sometype"); node.setProperty("someproperty", "sample"); node.addMixin(JcrConstants.MIX_REFERENCEABLE); // Changing "someproperty" property value "sample" to "change" in somewhere else. session = ... Node node = ... node.setProperty("someproperty", "change"); session.save();
However, "someproperty" is still "sample".