Apache JDO Project - [jira] Commented: (JDO-448) Add an xml element to specify the fetch

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > October 2007 > [jira] Commented: (JDO-448) Add an xml element to specify the fetch





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [jira] Commented: (JDO-448) Add an xml element to specify the fetch
Craig Russell (JIRA)

2007-10-19, 7:11 pm


[ https://issues.apache.org/jira/brow...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 thi
s 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.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com