Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1083

A call to Property#getDefinition returns null for new property nodes which are based on a replicated PropertyDefinition.

    Details

    • Estimated Difficulty:
      Low

      Description

      I have two nodes in a cluster. "Node 1" uses workspace1 and "Node 2" uses workspace2. The new type "searchable" is registered on "Node 1". When I try to create a new node of type "searchable" on "Node 2" then the the source code bellow writes twice null to STD.

      NEW NODE TYPE:
      NodeTypeTemplate nodeType = nodeTypeManager.createNodeTypeTemplate();
      nodeType.setName("searchable");
      nodeType.setMixin(true);

      PropertyDefinitionTemplate property = nodeTypeManager.createPropertyDefinitionTemplate();
      property.setName("keywords");
      property.setMultiple(true);
      property.setRequiredType(PropertyType.STRING);
      nodeType.getPropertyDefinitionTemplates().add(property);
      // Register the custom node type
      nodeTypeManager.registerNodeType(nodeType,false);

      SOURCE:
      Session session = client.getSession();
      Node root = session.getRootNode();
      Node folder = root.addNode("searchableFolder", "nt:folder");
      folder.addMixin("searchable");
      Property property = folder.setProperty("keywords", "k1");
      System.out.println("Property definition:" + property.getDefinition());
      session.save();
      System.out.println("Property definition:" + property.getDefinition());

        Gliffy Diagrams

          Attachments

          1. MODE-1083.patch
            9 kB
          2. modeshape-config.xml
            5 kB
          3. my-jdbc-ds.xml
            1 kB

            Issue Links

              Activity

                People

                • Assignee:
                  rhauch Randall Hauch
                  Reporter:
                  mbaluch Marek Baluch
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: