[
https://issues.apache.org/jira/browse/OPENJPA-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541198
]
Craig Russell commented on OPENJPA-370:
---------------------------------------
> According to the documentation, resetFetchGroup will reset back to the global
> configuration which I interpreted it as the default fetch group plus the
> property defined in the persistence.xml file . That's how the current
> implementaiton work at this moment. Therefore, both firstName and lastName
> are still available (not null) even though resetFetchGroup has been called.
> Please confirm the interpretation! If this is not true, then we have a bug in
> the openjpa for the resetFetchGroup.
You're right here. There is nothing in the JDO spec corresponding to
resetFetchGroups, so my comments will need to be updated. I erroneously thought
that resetFetchGroups referred to clearFetchGroups. Which we should add as a
test case to make sure that clear does in fact remove all fetch groups. So in
the test after resetFetchGroups, firstName and lastName should be available.
I also noticed we have a conflict between the javadoc and the documentation.
The javadoc refers to FetchConfiguration while the manual refers to FetchPlan.
FetchPlan is an interface in JDO, whereas FetchConfiguration is an OpenJPA
interface. So we're documenting FetchPlan in the manual but implementing
FetchConfiguration.
I'll raise a separate JIRA for this.
> LoadFetchGroup annotation was not recognized during the fetch1
> --------------------------------------------------------------
>
> Key: OPENJPA-370
> URL: https://issues.apache.org/jira/browse/OPENJPA-370
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.0.1, 1.0.2, 1.1.0
> Reporter: Teresa Kan
> Assignee: Teresa Kan
> Fix For: 1.0.2, 1.1.0
>
> Attachments: OPENJPA_370_2.patch, smime.p7s, TestFetchGroup.patch,
> TestFetchGroup.zip, TestJIRA370.zip
>
>
> Employee class has a LoadFetchGroup annotation defined on the Rating field,
> when getRating was called, the address should be returned also. However,
> openjpa did not handle the LoadFetchGroup correctly, therefore, address was
> not eargly fetched.
> public class FGEmployee{
> @Id
> private int id;
>
> @OneToOne(fetch=FetchType.LAZY)
> private FGAddress address;
>
> @Basic(fetch=FetchType.LAZY)
> @LoadFetchGroup("AddressFetchGroup")
> private String rating;
>
> @ManyToOne(fetch=FetchType.LAZY)
> private FGManager manager;
> ..
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.