Issue Details (XML | Word | Printable)

Key: JDO-410
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Michael Bouschen
Reporter: Marc Prud'hommeaux
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

AggregateResult queries non-existent Employee.manager.salary field

Created: 30/Aug/06 12:23 AM   Updated: 03/Oct/06 10:03 PM
Return to search
Component/s: tck2
Affects Version/s: JDO 2 final
Fix Version/s: JDO 2 maintenance release 1, JDO 2 TCK challenge fixes

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works JDO-410.patch 2006-09-10 06:50 PM Michael Bouschen 4 kB

Resolution Date: 14/Sep/06 09:38 PM


 Description  « Hide
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)"


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michael Bouschen added a comment - 10/Sep/06 06:50 PM
The attached patch for review implements the proposed fix.

Michael Bouschen added a comment - 14/Sep/06 09:38 PM
Checked in the patch (see revision 443484).

Michael Bouschen added a comment - 03/Oct/06 10:03 PM
Merged changed from trunk into branch 2.0.1 (see revision 452652).