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

jcr:uuid not being created for node types with mix:referenceable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Blocker
    • 3.0.0.CR2
    • 3.0.0.CR1
    • Server
    • None
    • Hide

      Register a node type, using the REST service, for example:

      [myType] > nt:unstructured, mix:referenceable
      

      Then create a new node of that type using the REST service:

      {
          'jcr:primaryType': 'myType',
          'prop1':'val1'
      }
      

      The results are:

          {
             "self": "http://localhost:8080/modeshape-rest/sample/default/items/reftest2",
             "up": "http://localhost:8080/modeshape-rest/sample/default/items/",
             "id": "f957f11d-8fda-4517-98b6-2fd4c0a361af",
             "jcr:primaryType": "myType",
             "prop1": "val1"
          }
      

      Notice the lack of jcr:uuid.

      However, interestingly, if mix:referencable is explicitly included in the mixin types:

      {
          'jcr:primaryType': 'nt:unstructured',
          'jcr:mixinTypes': ['mix:referenceable]',
          'prop1':'val1'
      }
      

      the result is correct:

          {
             "self": "http://localhost:8080/modeshape-rest/sample/default/items/reftest3",
             "up": "http://localhost:8080/modeshape-rest/sample/default/items/",
             "id": "234f09ff-d88f-489a-9700-15c6e8a9cc65",
             "jcr:primaryType": "nt:unstructured",
             "prop1": "val1",
             "jcr:mixinTypes": "mix:referenceable",
             "jcr:uuid": "234f09ff-d88f-489a-9700-15c6e8a9cc65"
          }
      
      
      
      Show
      Register a node type, using the REST service, for example: [myType] > nt:unstructured, mix:referenceable Then create a new node of that type using the REST service: { 'jcr:primaryType': 'myType', 'prop1':'val1' } The results are: { "self": "http://localhost:8080/modeshape-rest/sample/default/items/reftest2", "up": "http://localhost:8080/modeshape-rest/sample/default/items/", "id": "f957f11d-8fda-4517-98b6-2fd4c0a361af", "jcr:primaryType": "myType", "prop1": "val1" } Notice the lack of jcr:uuid. However, interestingly, if mix:referencable is explicitly included in the mixin types: { 'jcr:primaryType': 'nt:unstructured', 'jcr:mixinTypes': ['mix:referenceable]', 'prop1':'val1' } the result is correct: { "self": "http://localhost:8080/modeshape-rest/sample/default/items/reftest3", "up": "http://localhost:8080/modeshape-rest/sample/default/items/", "id": "234f09ff-d88f-489a-9700-15c6e8a9cc65", "jcr:primaryType": "nt:unstructured", "prop1": "val1", "jcr:mixinTypes": "mix:referenceable", "jcr:uuid": "234f09ff-d88f-489a-9700-15c6e8a9cc65" }

    Description

      Creating a node (in my case using the REST server) with a node type that includes mix:referenceable does not result in a jcr:uuid property.

      Attachments

        Issue Links

          Activity

            People

              hchiorean Horia Chiorean (Inactive)
              jonathandfields_jira Jonathan Fields (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: