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

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

Hi,
Teresa is out for a week or so, so I will attempt to represent her interests on 
this issue...

First thing is that there were several problems with the FetchGroup and 
FetchAttribute processing when Teresa started the investigation.  She worked 
with Pinaki on several of the problems:  
http://www.nabble.com/FetchGroup-and-FetchAttribute-question-tf4357034.html#a12416564

One of the problems that was not resolved directly by Pinaki was related to the 
LoadFetchGroup processing.  In a nutshell, LoadFetchGroup just didn't work per 
the documentation (or maybe our interpretation of the documentation).

In any case, she opened this Issue to resolve the problem with LoadFetchGroup.  
Although it may not be the best performing, at least it is now functional.  So, 
from the standpoint of whether this fix should be part of 1.0.x or not, I would 
say that it's better to have a functional LoadFetchGroup or not at all.

When I look back on this Issue, it discusses two patches, but as far as I can 
tell, there was only one patch ever attached to this issue.  There was the 
separate patch file for the testcase, but there was only a single runtime code 
patch.  From my discussions with Teresa, I believe the first patch idea was 
beyond her current understanding of the OpenJPA code base.  She could develop 
the patch #2 idea based on the current architecture -- although the performance 
may not be quite as good.

Bottom line, I agree that we could probably improve the implementation of 
LoadFetchGroup to be better performing.  But, my take is that we should focus 
our efforts on this improvement in the 1.1.0 trunk instead of pulling the 
functional implementation from the 1.0.x branch.  Unless someone is 
volunteering to redo the fix for 1.0.x to be both functional and better 
performing, and a timely manner...  :-)

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
>             Fix For: 1.0.1, 1.1.0
>
>         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.

Reply via email to