Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14519

Unable to perform outer joins in queries on unrelated entities

    XMLWordPrintable

Details

    • Bug
    • Resolution: Solved By
    • Major
    • None
    • 7.2-milestone-2
    • Storage
    • None
    • Unknown

    Description

      Because we are using an outdated version (3.6.9 at the time of writing) of Hibernate, we are suffering from an important limitation for performing queries: we can not perform outer joins on unrelated classes (unmapped in hibernate.hbm.xml); outer joins only work on mapped relationships.

      mflorea has more experience with this and he details one example of where this becomes problematic, but other, simpler usecases exist as well:

      • Unable to list all documents and an optional object that they may have
      • Unable to list all documents and optional other documents that may be associated through an object property
      • etc.

      Another consequence of this is that, when adding a "class" to a livetable column's parameters (to specify that it belongs to an object inside the page, other than the main class set in the livetable options), the query will only return documents that contain an object of that column's specified class.

      This Hibernate limitation seems to have been fixed in 5.1.0. Latest stable version is 5.2.10.

      Created this issue for reference and tracking until we manage the (sensitive) upgrade.

      Attachments

        Issue Links

          Activity

            People

              enygma Eduard Moraru
              enygma Eduard Moraru
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: