Error with JCR-SQL2 queries

Convert to sub-taskCloneLabelsXMLWordPrintable

    • Type: Fehler
    • Resolution: Done
    • Priority: Mittel / Medium
    • 1.8.0
    • Affects Version/s: 1.7.0
    • Component/s: Core
    • None
    • None
    • None

      Claudiu Muresan wrote:

      Hi guys,

      I don't know where I can submit issues found with the JCR explorer tool (Toromiro), so I just used this email.
      I'm connecting to a Jackrabbit 2.4.0 repository (http://localhost:9091/rmi) to the default workspace.
      I need to launch some test JCR-SQL2 queries on the repo (something like below ...)

      SELECT * FROM [nt:unstructured] AS inh
      INNER JOIN [nt:unstructured] AS ref ON ref.[kmp:reference]=inh.[jcr:uuid]
      WHERE (ref.[kmp:searchable]=true AND
          (ref.[kmp:label]='APPLICABLE' OR ref.[kmp:label]='UNCONFIRMED') AND
          CONTAINS(ref.[kmp:factsearch], 'Tac'))
      

      , and I get the below error:

      (Image)

      I believe you're using result.getNodes(), where result is an instance of QueryResult.
      For join queries, you have to allow selecting the selector for which we need to view the results e.g. result.getNodes("inh") or result.getNodes("ref"), where <inh> and <ref> would be an input on the GUI or simply detected from the SQL query (SELECT ... AS inh ... AS ref ...).

      Please let me know if this issue can be workaround'ed.

      Regards,
      Claudiu Muresan

            Assignee:
            Torsten Witte
            Reporter:
            Maik Schreiber
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: