Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2037

EJBQL: COUNT(DISTINCT .. ) doesn't properly translate paths ending with relationship

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.M2
    • 4.0.B2
    • None
    • None

    Description

      Per http://mail-archives.apache.org/mod_mbox/cayenne-user/201510.mbox/%3C23A9D9A5-62EA-4B59-B5AD-57150A1A8349%40karlmenn.is%3E

      I did some investigation, and in most cases COUNT(DISTINCT ..) does the right thing. Except when a path inside count ends in relationship (e.g. COUNT(DISTINCT p.artist)), in which case it generates SQL "COUNT (DISTINCT *)" that produces incorrect result.

      Attachments

        Issue Links

          Activity

            People

              ntimofeev Nikita Timofeev
              andrus Andrus Adamchik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: