Uploaded image for project: 'Magnolia DX Core'
  1. Magnolia DX Core
  2. MGNLEE-761

ContentMap#get method doesn't consider the PropertyType.REFERENCE type as array

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Neutral
    • None
    • 6.2.29
    • None
    • None

    Description

      When the ContentMap class is used for retrieve a REFERENCE property as jcr:predecessor it will fail because the get method won't consider it as multivalue.

      It would be better to include at the else if (type == PropertyType.REFERENCE) statement another check like  "if (prop.isMultiple())" so for those cases like jcr:predecessors, it won't thrown error as:

      jcr:predecessors is a multi-valued property, so it's values can only be retrieved as an array

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            1.
            Implementation Sub-task To Do Unassigned
            2.
            Review Sub-task To Do Unassigned
            3.
            Pre-Integration QA Sub-task To Do Unassigned
            4.
            QA Sub-task To Do Unassigned

            Activity

              People

                Unassigned Unassigned
                ccantalapiedra Carlos Cantalapiedra
                Nucleus
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD