Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-410

AggregateResult queries non-existent Employee.manager.salary field

    Details

      Description

      In 6 different places in the AggregateResult test, a query is issued against FullTimeEmployee and returns an aggregate on "manager.salary". However, the "manager" field is of type Employee, and the "salary" field is only defined in the FullTimeEmployee subclass of Employee, thus rendering the aggregate statement invalid.

      The solution is to replace all instances of "manager.salary" with a clause that casts "manager" down to "FullTimeEmployee". E.g.: "(((FullTimeEmployee)manager).salary)"

        Attachments

        1. JDO-410.patch
          4 kB
          Michael Bouschen

          Activity

            People

            • Assignee:
              mbo Michael Bouschen
              Reporter:
              mprudhom Marc Prud'hommeaux
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: