openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Teresa Kan (JIRA)" <>
Subject [jira] Updated: (OPENJPA-370) LoadFetchGroup annotation was not recognized during the fetch1
Date Thu, 08 Nov 2007 20:20:51 GMT


Teresa Kan updated OPENJPA-370:

    Attachment: TestFetchGroup.patch

I modified the TestFetchGroup testcase based on the current discussion and understanding of
the fetch group and loadFetchGroup concept.. The testcases work with the current implementation
now. However, I have one question about Craig's comment on the testcase 002, 
Craig said,
"The difference between test001 and test002 isn't checked. In test001, lastName and firstName
should be not null because they are in the default fetch group. In test002, they should be
null because the reset fetch group has no fields."
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.


> LoadFetchGroup annotation was not recognized during the fetch1
> --------------------------------------------------------------
>                 Key: OPENJPA-370
>                 URL:
>             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,,
> 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.

View raw message