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

Warnings for deprecated usage of HQL ordinal parameters when applying a date filter on Deleted Attachments livetable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 12.2, 11.10.5
    • 12.1
    • Old Core
    • Windows 10 Pro 64 bit, Chrome 80, using a local instance of XWiki 12.1 on MySQL 5.7
    • Unknown
    • N/A
    • N/A

    Description

      STEPS TO REPRODUCE

      1. Delete some attachments
      2. Go to Drawer > Page Index > Deleted Attachments tab
      3. Click on 'Deleted on' filter and select 'Yesterday' for ex.
      4. Observe the XWiki console

      EXPECTED RESULTS

      No warnings/errors are displayed.

      ACTUAL RESULTS

      Some warnings are displayed related to deprecated usage of HQL parameters every time a date filter is applied. Stacktrace:

      2020-02-25 17:54:33,690 [http://localhost:1211/xwiki/bin/view/XWiki/DeletedAttachments?list=1&xpage=plain&outputSyntax=plain&offset=1&limit=15&reqNo=2&datt.date=1582495200000-1582581599999&&sort=datt.filename&dir=asc] WARN  c.x.x.XWiki                    - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [select datt.id, datt.filename from DeletedAttachment as datt where 1=1  and datt.date between ? and ?  order by datt.filename asc] has been converted to [select datt.id, datt.filename from DeletedAttachment as datt where 1=1  and datt.date between ?1 and ?2  order by datt.filename asc]
      2020-02-25 17:54:33,700 [http://localhost:1211/xwiki/bin/view/XWiki/DeletedAttachments?list=1&xpage=plain&outputSyntax=plain&offset=1&limit=15&reqNo=2&datt.date=1582495200000-1582581599999&&sort=datt.filename&dir=asc] WARN  c.x.x.XWiki                    - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [select count(*) from DeletedAttachment as datt where 1=1  and datt.date between ? and ? ] has been converted to [select count(*) from DeletedAttachment as datt where 1=1  and datt.date between ?1 and ?2 ]

      Attachments

        Issue Links

          Activity

            People

              oana.florean@xwiki.com Florean Oana-Lavinia
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: