Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-581

CountQueryPostProcessor assumes a where clause

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7
    • 0.7
    • Data-Module
    • None
    • openejb-core 4.6.1-SNAPSHOT
      Deltaspike 0.7-SNAPSHOT

    Description

      CountQueryPostProcessor assumes there's a where clause when it rewrites to count query.

      private String rewrite()

      { return "select count(" + (select != null ? select : entityName) + ") " + from + where; }

      here where can easily be null causing a query like this:

      select count( fact ) from Fact factnull

      Attachments

        Activity

          People

            thomashug Thomas Hug
            karlkilden Karl Kildén
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: