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)"

      1. JDO-410.patch
        4 kB
        Michael Bouschen

        Activity

        Hide
        Michael Bouschen added a comment -

        The attached patch for review implements the proposed fix.

        Show
        Michael Bouschen added a comment - The attached patch for review implements the proposed fix.
        Hide
        Michael Bouschen added a comment -

        Checked in the patch (see revision 443484).

        Show
        Michael Bouschen added a comment - Checked in the patch (see revision 443484).
        Hide
        Michael Bouschen added a comment -

        Merged changed from trunk into branch 2.0.1 (see revision 452652).

        Show
        Michael Bouschen added a comment - Merged changed from trunk into branch 2.0.1 (see revision 452652).

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development