You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Kevin Sutter (JIRA)" <ji...@apache.org> on 2007/09/28 15:58:50 UTC

[jira] Commented: (OPENJPA-370) LoadFetchGroup annotation was not recognized during the fetch1

    [ https://issues.apache.org/jira/browse/OPENJPA-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531014 ] 

Kevin Sutter commented on OPENJPA-370:
--------------------------------------

Teresa,
I'm looking at your patch and the comments in this Issue.  The Patch 2 approach looks good to me.  I suggest we go ahead with this patch for both 1.0.x and 1.1.0.  If there are tweaks (desired or required) to the implementation, then we'll deal with them.  At least with this patch, we now have a working LoadFetchGroup annotation.

Question concerning the tests.  They all seem to run just fine, but is the current package the proper location (org.apache.openjpa.persistence.query)?  I'm thinking a separate fetchgroup package would be better.  And, we 're bound to add more tests along the way.  If that's okay with you, I'll do the move, you don't have to supply another patch.  I will also add the required license header on the testcases.

Thanks,
Kevin

> 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.1.0
>            Reporter: Teresa Kan
>            Assignee: Teresa Kan
>         Attachments: OPENJPA_370_2.patch, TestFetchGroup.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.


Re: [jira] Commented: (OPENJPA-370) LoadFetchGroup annotation was not recognized during the fetch1

Posted by Teresa Kan <tc...@gmail.com>.
Kevin,
Yes, I think we can move the testcase to a separate fetchgroup package.
Thanks,
Teresa


On 9/28/07, Kevin Sutter (JIRA) <ji...@apache.org> wrote:
>
>
>    [
> https://issues.apache.org/jira/browse/OPENJPA-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531014]
>
> Kevin Sutter commented on OPENJPA-370:
> --------------------------------------
>
> Teresa,
> I'm looking at your patch and the comments in this Issue.  The Patch 2
> approach looks good to me.  I suggest we go ahead with this patch for both
> 1.0.x and 1.1.0.  If there are tweaks (desired or required) to the
> implementation, then we'll deal with them.  At least with this patch, we now
> have a working LoadFetchGroup annotation.
>
> Question concerning the tests.  They all seem to run just fine, but is the
> current package the proper location (org.apache.openjpa.persistence.query)?  I'm
> thinking a separate fetchgroup package would be better.  And, we 're bound
> to add more tests along the way.  If that's okay with you, I'll do the move,
> you don't have to supply another patch.  I will also add the required
> license header on the testcases.
>
> Thanks,
> Kevin
>
> > 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.1.0
> >            Reporter: Teresa Kan
> >            Assignee: Teresa Kan
> >         Attachments: OPENJPA_370_2.patch, TestFetchGroup.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.
>
>