JDO
  1. JDO
  2. JDO-404

GetFetchPlan - Is it really forbidden to load extra fields?

    Details

      Description

      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...

      1. JDO-404.patch
        4 kB
        Michael Bouschen

        Activity

        Hide
        Michael Bouschen added a comment -

        Checked in the patch (see revision 453265).

        Show
        Michael Bouschen added a comment - Checked in the patch (see revision 453265).
        Hide
        Craig L Russell added a comment -

        The patch looks good.

        Show
        Craig L Russell added a comment - The patch looks good.
        Hide
        Ilan Kirsh added a comment -

        The patch seems to do the trick. Thanks.

        Show
        Ilan Kirsh added a comment - The patch seems to do the trick. Thanks.
        Hide
        Michael Bouschen added a comment -

        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.

        Show
        Michael Bouschen added a comment - 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.

          People

          • Assignee:
            Michael Bouschen
            Reporter:
            Ilan Kirsh
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development