[
https://issues.apache.org/jira/browse/SLING-1329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805255#action_12805255
]
Jason Rose commented on SLING-1329:
-----------------------------------
Ok, I've updated my source and verified that I get output now when I visit the
multiple reference property. I have a couple of questions about its behavior,
though:
1) Is it intended to just output the jcr:uuids of the nodes in the collection?
I was hoping that the servlet would retrieve the nodes that they reference and
serialize them.
2) If they are behaving as intended, is it trivial to write an esp or override
the servlets myself to implement that sort of behavior? This sort of behavior
was one of the biggest benefits I was hoping that sling had.
3) Is this sort of approach the best way to implement a many-to-many
relationship where I need to traverse relationships in this manner?
> Multiple-value Reference Properties
> -----------------------------------
>
> Key: SLING-1329
> URL: https://issues.apache.org/jira/browse/SLING-1329
> Project: Sling
> Issue Type: Bug
> Environment: Karaf 1.2.0, trunk build of sling installed using
> features.xml (rev 902845), java 1.6, maven 2.2.1
> Reporter: Jason Rose
> Attachments: jiracase.zip
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.