Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29602

CMIS: Cannot use JOIN and CONTAINS clause in same query

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.10
    • Fix Version/s: HOTFIX_10.10, 11.x
    • Component/s: CMIS

      Description

      Configure Nuxeo+showcase with

      org.nuxeo.cmis.joins=true
      org.nuxeo.cmis.enableComplexProperties=true
      org.nuxeo.cmis.proxies=false
      org.nuxeo.cmis.elasticsearch=true
      

      and try the following CMIS queries:

      SELECT b.cmis:objectId FROM File AS b WHERE CONTAINS(b,'2007')

      WORKS: The CONTAINS clause retrieves the EXCEL sample file of showcase

      SELECT a.cmis:objectId FROM cmis:document AS a JOIN File as b ON a.cmis:objectId = b.cmis:objectId

      WORKS: This is a complexified query (using JOIN) which simply returns all File documents

      SELECT a.cmis:objectId FROM cmis:document AS a JOIN File as b ON a.cmis:objectId = b.cmis:objectId WHERE CONTAINS(b,'2007')

      FAILS: combination of the JOIN and CONTAINS clause which fails with:

      Caused by: org.h2.jdbc.JdbcSQLException: Column "HIERARCHY.ID" not found; SQL statement:
      SELECT "_a_HIERARCHY"."ID", "_a_HIERARCHY"."PRIMARYTYPE", "_b_HIERARCHY"."ID", "_b_HIERARCHY"."PRIMARYTYPE" FROM "HIERARCHY" "_a_HIERARCHY" JOIN "HIERARCHY" "_b_HIERARCHY" ON ("_a_HIERARCHY"."ID" = "_b_HIERARCHY"."ID") LEFT JOIN NXFT_SEARCH('PUBLIC_FULLTEXT_default', ?) "_NXFTTBL" ON "_NXFTTBL".KEY = "HIERARCHY"."ID" WHERE "_a_HIERARCHY"."PRIMARYTYPE" IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) AND ("_a_HIERARCHY"."ISTRASHED" <> ? OR "_a_HIERARCHY"."ISTRASHED" IS NULL) AND "_b_HIERARCHY"."PRIMARYTYPE" IN (?) AND ("_b_HIERARCHY"."ISTRASHED" <> ? OR "_b_HIERARCHY"."ISTRASHED" IS NULL) AND "_NXFTTBL".KEY IS NOT NULL
      

      where the failing clause seems to be: "_NXFTTBL".KEY = "HIERARCHY"."ID"

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pabgrall Patrick Abgrall
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: