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

Multiple-value Reference Properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Servlets Get 2.1.0
    • None
    • None
    • Karaf 1.2.0, trunk build of sling installed using features.xml (rev 902845), java 1.6, maven 2.2.1

    Description

      I am creating 2 node subtrees for two entities with a many-to-many relationship to each other. I am implementing this relationship as a strong reference, multiple value property on each entity node under the subtrees. I'm loading in the data as nt:unstructured with mix:referenceable as the only addition, so I can make references between the two. The tree looks like this:

      /multiple-reference-property (root for this test)

      --users
      --user a(random uuid as its name)
      --regions-single (single property reference to region a, seems to work)
      --regions (multiple-valued reference property to regions a-e, renders fine as text but doesn't act as relationship if I try to traverse it via URL)
      --users b-e, set up identically to user a
      --regions
      --region a(random uuid as its name)
      --users-single (single property reference to user a, seems to work)
      --users (multiple-valued reference property to users a-e, renders fine as text but doesn't act as a relationship if I try to traverse it via URL)

      I can successfully use URLs like localhost:8181/multiple-reference-property/regions/<uuid to region a>/users-single.<json, xml, txt doesn't matter they all work>

      What does not work is a URL like localhost:8181/multiple-reference-property/regions/<uuid to region a>/users.<xml, json, doesn't matter none work>

      The data is loaded via a bundle, since using the contentloader with flat files will be unfeasible later in my project's future, because it will need a very large and randomized dataset, which only seems easily doable by directly interacting with the JCR api.

      Of course if there is a more preferred way to implement a relationship like this, please let me know. I would strongly prefer to not use weak references in this case.

      Attachments

        1. jiracase.zip
          7 kB
          Jason Rose

        Activity

          People

            Unassigned Unassigned
            jason.rose Jason Rose
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: