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

ORDER BY COUNT does not work with XWQL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 6.0-rc-1
    • 5.1
    • Query
    • Unknown
    • N/A
    • N/A

    Description

      This XWQL request :

         select topic.author, count(topic.author)
           from Document doc, doc.object(MailArchiveCode.MailTopicClass) as topic
          where doc.space<>'MailArchiveCode'
       group by topic.author
       order by count(topic.author) desc
      

      ... will throw an org.xwiki.query.jpql.parser.ParserException exception when executed.

      This does not work better :

         select topic.author, count(topic.author)
           from Document doc, doc.object(MailArchiveCode.MailTopicClass) as topic
          where doc.space<>'MailArchiveCode'
       group by topic.author
       order by 2 desc
      

      In JPQL this would be allowed normally, and it could be useful to have it in XWQL.

      Attachments

        Activity

          People

            gdelhumeau Guillaume Delhumeau
            jbousque Jeremie BOUSQUET
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: