[ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536367 ]
Craig Russell commented on JDO-448: ----------------------------------- There are a couple of ways to handle this issue. 1. Add element fetch-group*, and attributes max-fetch-depth, fetch-size to element query. These are used to set the FetchPlan in the stored query. <query name="BySalary" max-fetch-depth="3" fetch-size="17"> <fetch-group name="default"/> <fetch-group name="images"/> SELECT THIS from Employee WHERE salary == :salary </query> 2. Add a new fetch-plan element that contains fetch-group* and attributes name, max-fetch-depth, fetch-size. Add attribute fetch-plan to element query. <fetch-plan name="EmployeeImages" max-fetch-depth="3" fetch-size="17"> <fetch-group name="default"/> <fetch-group name="images"/> </fetch-plan> <query name="BySalary" fetch-plan="EmployeeImages"> SELECT THIS from Employee WHERE salary == :salary </query> 3. Add a new fetch-plan element that contains fetch-group* and attributes max-fetch-depth, fetch-size. Add element fetch-plan to element query. <query name="BySalary"> <fetch-plan name="EmployeeImages" max-fetch-depth="3" fetch-size="17"> <fetch-group name="default"/> <fetch-group name="images"/> </fetch-plan> SELECT THIS from Employee WHERE salary == :salary </query> I like the idea of named fetch plans because the same fetch plan could then be used in multiple queries. Also, I think there is value in being able to specify declaratively what a fetch plan is, without having to use an API to declare it. We could use this in other places in the spec. So I'm leaning toward option 2. > Add an xml element to specify the fetch plan to use for a query > --------------------------------------------------------------- > > Key: JDO-448 > URL: https://issues.apache.org/jira/browse/JDO-448 > Project: JDO > Issue Type: New Feature > Components: api2, api2-legacy, specification > Affects Versions: JDO 2 final > Reporter: Michelle Caisse > Assignee: Craig Russell > Fix For: JDO 2 maintenance release 1 > > > In Chapter 18, add an xml element to specify the fetch plan to use for a > query. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.