You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Michelle Caisse (JIRA)" <ji...@apache.org> on 2006/12/09 00:22:21 UTC

[jira] Created: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Add an xml element to specify the fetch plan to use for a query
---------------------------------------------------------------

                 Key: JDO-448
                 URL: http://issues.apache.org/jira/browse/JDO-448
             Project: JDO
          Issue Type: New Feature
          Components: api2, api2-legacy
    Affects Versions: JDO 2 final
            Reporter: Michelle Caisse
         Assigned To: Craig Russell


In Chapter 18, add an xml element to specify the fetch plan to use for a query.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michelle Caisse updated JDO-448:
--------------------------------

    Attachment:     (was: jdo-448.patch)

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Commented: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552838 ] 

Craig Russell commented on JDO-448:
-----------------------------------

Looks good.

The comment
+/**
+ * Annotation for a group of fetch-group objects
+ * 
+ * @version 2.1
+ * @since 2.1

Should refer to a group of FetchPlan not fetch-group.

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Commented: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552422 ] 

Andy Jefferson commented on JDO-448:
------------------------------------

Why not add @FetchPlans too, in the same style as @FetchGroups ? Would mean that a class could define multiple fetch plans, rather than being limited to a single one.

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Updated: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michelle Caisse updated JDO-448:
--------------------------------

    Attachment: jdo-448.patch

Thanks for the comments Andy. I've attached a patch with the changes.

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch, jdo-448.patch
>
>
> 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.


[jira] Assigned: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Craig Russell reassigned JDO-448:
---------------------------------

    Assignee: Michelle Caisse  (was: Craig Russell)

> 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: Michelle Caisse
>             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.


[jira] Commented: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552654 ] 

Andy Jefferson commented on JDO-448:
------------------------------------

Michelle, looks good, except the @FetchPlan annotation has the defaults reversed from my comment above.

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Commented: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552848 ] 

Craig Russell commented on JDO-448:
-----------------------------------

+    /**
+     * The fetch groups in this fetch plan.
+     * @return the fetch groups 
+     */
+    String[] fetchGroups() default "";

The default should be [ ] not "".



> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Resolved: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michelle Caisse resolved JDO-448.
---------------------------------

    Resolution: Fixed

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Commented: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552663 ] 

Andy Jefferson commented on JDO-448:
------------------------------------

Also @Query will need an attribute "fetchPlan" to allow the same as <query fetch-plan="...">

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Commented: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552474 ] 

Andy Jefferson commented on JDO-448:
------------------------------------

@FetchPlan : The default for "maxFetchDepth" should be 1, and the default for fetchSize should be 0 (FETCH_SIZE_OPTIMAL) for consistency with javax.jdo.FetchPlan

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Updated: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michelle Caisse updated JDO-448:
--------------------------------

    Attachment: jdo-448.patch

The attached patch adds an annotation and xml schema for a named fetch plan. The annotation applies to a type and the xml metadata is nested within the jdo element. I did not add fetch-plan the jdoquery schema because that would have required adding fetch-group to the schema, which in turn would have required adding field, property, ...

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Updated: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michelle Caisse updated JDO-448:
--------------------------------

    Attachment:     (was: jdo-448.patch)

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Commented: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552820 ] 

Craig Russell commented on JDO-448:
-----------------------------------

The xsd patch will apply to both api2 and api2-legacy.

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Updated: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-448?page=all ]

Craig Russell updated JDO-448:
------------------------------

    Fix Version/s: JDO 2 maintenance release 1

> Add an xml element to specify the fetch plan to use for a query
> ---------------------------------------------------------------
>
>                 Key: JDO-448
>                 URL: http://issues.apache.org/jira/browse/JDO-448
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2, api2-legacy
>    Affects Versions: JDO 2 final
>            Reporter: Michelle Caisse
>         Assigned To: 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-448?page=all ]

Craig Russell updated JDO-448:
------------------------------

    Component/s: specification

> Add an xml element to specify the fetch plan to use for a query
> ---------------------------------------------------------------
>
>                 Key: JDO-448
>                 URL: http://issues.apache.org/jira/browse/JDO-448
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2, specification, api2-legacy
>    Affects Versions: JDO 2 final
>            Reporter: Michelle Caisse
>         Assigned To: 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michelle Caisse updated JDO-448:
--------------------------------

    Attachment: jdo-448.patch

New patch with latest fixes attached.

> 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: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-448.patch
>
>
> 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.


[jira] Commented: (JDO-448) Add an xml element to specify the fetch plan to use for a query

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541403 ] 

Michelle Caisse commented on JDO-448:
-------------------------------------

I also like being able to define a named fetch-plan. This works well with xml metadata where you can nest a fetch-plan element under <jdo>, but with annotations you would have to apply the @FetchPlan annotation to a class or interface, while the intent is for the scope to be global.

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