openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <>
Subject [jira] Commented: (OPENJPA-370) LoadFetchGroup annotation was not recognized during the fetch1
Date Thu, 01 Nov 2007 03:47:50 GMT


Craig Russell commented on OPENJPA-370:

I'm looking at the test case TestFetchGroup.

The test cases should check firstName and lastName in addition to the other fields.

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.

In test003, the only fields fetched should be the id and rating. In particular, address, firstName,
and lastName should not be fetched. This test case seems to be central to the discussion here,
and it appears to be checking the wrong result.

The comments in the assertions don't match what's being checked. And the typos are very distracting.

In test008 there are two EntityManagers used, and it doesn't appear that the usage of oem
and oem1 are correct. What is the intent of having two em's?

> 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.1.0
>            Reporter: Teresa Kan
>            Assignee: Teresa Kan
>             Fix For: 1.0.1, 1.1.0
>         Attachments: OPENJPA_370_2.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