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

HQL queries in DBList need to be lowercase

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      In some conditions, an ArrayOutOfBound Exception is triggered by DBLIstClass if the Hibernate query of a DBList property is not in lowercase:
      https://github.com/xwiki/xwiki-platform/blob/df2e86d2a476a225dd525e23836c9edb011e73f7/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/DBListClass.java#L450

      If the query contains "FROM" instead of "from", the indexOf will return -1.

      It has been revealed by a custom displayer (http://extensions.xwiki.org/xwiki/bin/view/Extension/Multiselect+custom+display) on a custom project, but we usually not hit this issue on XE.

        Attachments

          Activity

            People

            • Assignee:
              gdelhumeau Guillaume Delhumeau
              Reporter:
              gdelhumeau Guillaume Delhumeau
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: