Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10740

Repoinit create path statement fails for node types with a mandatory property

    XMLWordPrintableJSON

Details

    Description

      The processing of the "create path" statement calls save() at the end which will cause a constraint violation if the nodetype of the created path contains any properties that are declared as mandatory (and not autocreated).  No processing of "set properties" statements happens before the save() call in AclVisitor#visitCreatePath so it does not seem to be possible to define any mandatory properties using the current repoinit grammar.

      I could see this solved in a couple ways:

      1. The AclVisitor#visitCreatePath could possibly pre-process any "set properties" statements that are applicable to the created path before calling save and then skip those same items when NodePropertiesVisitor visits the same.
      2. Or, the "create path" grammar could be extended to allow defining properties to be set at the same time as the create (with a syntax that is similar to the "set properties" statement?)
      3. Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary?  I'm not sure of the historical reasons why save() is done there.
      4. Or, maybe something else I haven't thought of

       

       

      Attachments

        Activity

          People

            enorman Eric Norman
            enorman Eric Norman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 50m
                1h 50m