Issue Details (XML | Word | Printable)

Key: CORE-2515
Type: Task Task
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JPOX Core (ARCHIVED)

FetchPlan - support field.field, field#element.field, field#key.field, field#value.field syntax

Created: 09/Sep/05 08:52 AM   Updated: 23/Jul/07 12:25 PM
Component/s: JDO
Affects Version/s: 1.1.0-beta-4
Fix Version/s: None


 Description  « Hide
The JDO2 spec defines the ability to specify fetch groups using field specs including
field1.field2
field1.field2.field3
field1#element
field1#element.field3


Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 23/Jul/07 12:25 PM
This is low priority since the same can be achieved by specifying fetch groups for each of the classes concerned.

An example
class A
{
    B b;
}
class B
{
    C c;
}
and we want to have a fetch group that loads up A.b, and B.c. With the above syntax we would add this for class A
<fetch-group name="group1">
    <field name="b"/>
    <field name="b.c"/>"
</fetch-group>


however you could easily do
(class A)
<fetch-group name="group1">
    <field name="b"/>
</fetch-group>
(class B)
<fetch-group name="group1">
    <field name="c"/>
</fetch-group>


Work required to complete this :-
1. Update AbstractPropertyMetaData so that it if a field name of "a.b" is specified it doesnt just put the name as "b".
2. Update FetchGroupMetaData.initialise() so that when encountering a field name specification as above, it finds the class that the field refers to and adds a fetch group of the same name over there (recursive).