-
Bug
-
Resolution: Won't Do
-
Critical
-
3.1.3.Final
-
None
In S-RAMP we have a use-case where this would be useful. The S-RAMP query will be something like:
/s-ramp/wsdl/Message[@name='MyMessage']/part
This should select all of the Part artifacts for the WSDL Message with the given name. If we assume there are two Parts for a particular Message, then in ModeShape we model it something like this:
root |-->Message_uuid1(name='MyMessage') |--> Relationship(type='part', target=<multi-reference-property w/ two references) |-->Part_uuid1(name='Part1') |-->Part_uuid2(name='Part2')
The attempted JCRSQL2 query to retrieve the two Part nodes is:
SELECT DISTINCT artifact2.* FROM [sramp:baseArtifactType] AS artifact1 JOIN [sramp:relationship] AS relationship1 ON ISCHILDNODE(relationship1, artifact1) JOIN [sramp:baseArtifactType] AS artifact2 ON relationship1.[sramp:target] = artifact2.[jcr.uuid] WHERE artifact1.[sramp:artifactType] = 'Message' AND relationship1.[sramp:type] = 'part')
I have created a standalone (slimmed down) unit test that shows the behavior. See attached.
- is related to
-
MODE-1888 Capture warnings on queries, especially for common mistakes
-
- Closed
-