Issue Details (XML | Word | Printable)

Key: JDO-404
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Michael Bouschen
Reporter: Ilan Kirsh
Votes: 0
Watchers: 0
Operations

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

GetFetchPlan - Is it really forbidden to load extra fields?

Created: 09/Aug/06 08:18 AM   Updated: 05/Oct/06 03:19 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-404.patch 2006-10-04 09:28 PM Michael Bouschen 4 kB

Resolution Date: 05/Oct/06 03:19 PM


 Description  « Hide
The tests in org.apache.jdo.tck.query.api.GetFetchPlan validate using jdoPostLoad that some fields are not loaded in the query results. This doesn't make sense for implementations in which avoiding loading value fields doesn't give any performance benefit, and I think that it is also against the spec (page 127):

"When an instance is loaded using getObjectById , a Query is executed, or an Extent is iterated, the implementation may choose to use the active fetch groups to prefetch data." - may choose and not must...

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michael Bouschen added a comment - 04/Oct/06 09:28 PM
I agree. Since the implementation may choose to use the active fetch groups to prefetch data, the test cannot test this behaviour.

The attached patch for review removes the code from the test class that checks whether fields are loaded because a ceratin fetch group is active. The test still checks whether multiple calls of getFetchPlan return the identical instacne and whether addGroup/removeGroup modify the current fetch plan.

Ilan Kirsh added a comment - 04/Oct/06 10:24 PM
The patch seems to do the trick. Thanks.

Craig Russell added a comment - 04/Oct/06 11:57 PM
The patch looks good.

Michael Bouschen added a comment - 05/Oct/06 03:19 PM
Checked in the patch (see revision 453265).