Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12784

EntityReferenceTree doesn't support sibling nodes with the same name but different types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.4-milestone-1
    • 6.4.5
    • Model
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      The following:

      $services.model.toTree([
        $services.model.createDocumentReference('foo', 'One', 'Two'),
         $services.model.createDocumentReference('foo', ['One', 'Two'], 'Three')
      ])
      

      generates:

      [Wiki foo = [Space foo:One = [foo:One.Two = [foo:One.Two.Three]]]]
      

      because the tree doesn't support having:

      • space foo:One.Two
      • document foo:One.Two

      as sibling nodes. The tree stores the child nodes internally in a map where the key is the entity name, which is "Two" for both the space and the document in our case.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: